So, I have a box with checkboxes that you must select before submitting. The problem is that this is not a constant number of flags, because it depends on the number of values โโretrieved from the database that need to be checked.
Basically, the number of flags ranges from 1 to 9.
I submit the values โโusing ajax, so I did not list the checkbale elements in the form, rather, they are in the list. Something like that
Unit 1: <input type="checkbox" name="unit[]" value="1"/>
Unit 2: <input type="checkbox" name="unit[]" value="2"/>
Unit 3: <input type="checkbox" name="unit[]" value="3"/>
Unit 4: <input type="checkbox" name="unit[]" value="4"/>
<input type="submit" value="register units"/>
Question: how can I guarantee that every time all flags will be checked before sending.
source
share