Check a Checkbox with Code
-
For simplicity’s sake, let say I have a dropdown field (fieldname1) that has two choices; Fruits and Vegetables.
Fieldname2 is a checkbox field with choices for different fruits and vegetables; bananas, carrots, mushrooms, strawberries, etc.
Selecting any of the choices in fieldname2 triggers a dependent div field that has a calculator for the price of that item (e.g. clicking on bananas gives you the banana calculator)
If Fruits is selected in the dropdown in fieldname1, what is the auxiliary code to check the boxes for all fruits in fieldname2, but also let the user deselect any unwanted choices (e.g. they want to see the calculator for bananas but not strawberries.
I would appreciate any help. Thanks.
- You must be logged in to reply to this topic.