Answered
Required Fields Based on Drop Down
I'm creating a form where I have people registering for an event.
There is a drop down list for users to select 0-4 people in attendance. Below that, we have 4 spaces for each person attending.
I'm looking for a script that will only show the field and make it required based on the number of people.
Ex)
---User selects 0 (0 Value) people in attendance from the dropdown (labelled as FEG)
Fields "NameA", "NameB", "NameC", and "NameD" are hidden and not required.
---User selects 1 (225 Value) person in attendance from the dropdown (labelled as FEG)
Field "NameA" is made visible and required. Fields "NameB", "NameC", and "NameD" are hidden and not required.
---User selects 2 (450 Value) people in attendance from the dropdown (labelled as FEG)
Fields "NameA" and "NameB" are made visible and required. Fields , "NameC", and "NameD" are hidden and not required.
---User selects 3 (675 Value) people in attendance from the dropdown (labelled as FEG)
Fields "NameA", "NameB", and "NameC" are made visible and required. Fields "NameD" is hidden and not required.
---User selects 4 (900 Value) people in attendance from the dropdown (labelled as FEG)
Fields "NameA" and "NameB", "NameC", and "NameD" are made visible and required.
I've tried a few scripts, based off of other things I've seen, but it's not working out for me.
