In case the quantity and unlimited checkbox.
By checking the checkbox, a line with other checkboxes is released with the desired amount of that ingredient:
Ingrediente Quantidade
[ ] Alface id#1 [X] 1x [ ] 2x [ ] 3x
[X] Bacon id#2 [ ] 1x [ ] 2x [X] 3x
[ ] Queijo Cheddar id#3 [X] 1x [ ] 2x [ ] 3x
[X] Mostarda Dijon id#4 [ ] 1x [X] 2x [ ] 3x
.
Array
(
[ingrediente_id] => Array
(
[0] => 2
[1] => 4
)
[quantidade_id] => Array
(
[0] => 1
[1] => 3
[2] => 1
[3] => 2
)
)
How do I just save the quantity_id that was checked by the checkbox corresponding to ingredient_id?
the ingredients that have not been marked may not appear in the quantity_id array