Designing and processing a form where the user can add an arbitrary number of new input fields is very tedious without using JavaScript.
Currently I am doing the following: using two different submit buttons in a form, one for adding a new input field and one for submitting the form which results into a database request.
the used method is POST
for adding new input fields I would like to use GET but since two methods in one form is not possible I have to do it in the POST request.
making this for one type of input field is rather easy, but when you need to do this for sub-forms (some groups of input fields in the same form), this becomes not only tedious, but also error-prone!
I am not satisfied, is there a more intelligent way to realize this without starting to write a lot of processing code and doing redirection or at least ease the implementation to reduce the error risk!
Also, maybe there is a solution provided by Java to solve this generically elegant, since I am using Java Servlets.
With JavaScript turned on I would offer a separate solution, I am only concerned with the fall back solution, this is not the normal case.