-
Extending HTML Forms
I am trying to create an HTML form in which user will enter different items (he wants to purchase) in text fields. One text field is used for one item. Now it is not known in advance how much items the user will purchase so we cannot decide the total text fields required in advance. Is is possible to increase the number of text fields (using JavaScript) one by one if the user requires more fields.
Bye
-
Re: Extending HTML Forms
Use a <div> and change the innerHTML content. The form will process that as well.
-
Re: Extending HTML Forms
You also might use a little javascript function that would add one more field each time the previous was filled, using method.
-
Re: Extending HTML Forms
Using document.write() after the page is already loaded re-writes the whole page content.