Improving usability of input forms in web applications

In the web application I am developing, I had a barcode input text field and a URL input text field for two different functions of the application. This resulted in 4 text input fields and 4 submit buttons. The layout of the web page became confusing for new users and clattered. I needed to reduce input fields in the front end but also in the already implemented back end.
1 answer

This one is the BEST answer!

I improved usability by reducing it to one input text field and two buttons for two functionalities. On the front end I used "formaction" attribute in buttons instead of "action" attribute in the form. So I reduced everything into one form. In the backend, it was a bit more complicated. I needed to differentiate between different types of input and gather different classes of the two functionalities into one class. This helped remove code duplicates and made the code easier to understand. In the end, the usability of the web page improved greatly and the backend code was also improved.