Hi, I'm setting up a form in which multiple entries can potentially be made (via an Add more button) for one of the qestions. I'm trying to figure out the best way to make this accessible without javascript and also to allow the input fields to be shown dynamically each time the Add button is clicked. There are 3 pieces of data i need to collect for each entry, below is the basics of what the HTML will look like:
Type: <input name = "type[]" id = "type" />
Sub type: <input name = "subtype[]" id = "type" />
Number: <input name = "num[]" id = "type" />
I don't have a problem with the JS code required to create this content dynamically on each click of the Add button, but I am thinking that as it is reasonable to set a limit on the amount of rows a person could add (for this type of data, 10 entries would be the very maximum i would expect), I could just add ten empty fields to the HTML form. Then, my jQuery code would hide them on domready, then each time the Add button is clicked, it simply shows the next available empty field on the form (until it gets to the 10th, at which point the Add button is disabled).
Does this approach make any sense?