If I have a multicheckbox (more checkboxes with same name, different values), and I getValues on it, I ususally get array of selected values (and nulls for not checked fields). But if I check only the last checkbox, I'll get a string insted. It should always return an array.
Here is the fiddle http://ift.tt/1mHNQWA
See also the console output:
Both checked:
First one checked:
Second one checked:
Here is the fiddle http://ift.tt/1mHNQWA
See also the console output:
Both checked:
- ingredients: Array[2]
- 0: "tomato"
- 1: "salami"
- length: 2
First one checked:
- ingredients: Array[2]
- 0: "tomato"
- 1: null
- length: 2
Second one checked:
- ingredients: "salami"
Aucun commentaire:
Enregistrer un commentaire