• Resolved crosstherubicon

    (@crosstherubicon)


    I’m trying to figure out how to make something conditional. I want to require certain fields if certain check boxes are ticked. Is that possible? If so, how? I don’t see that in the documentation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    https://conditional-fields-cf7.bdwm.be/checkbox/

    :EDIT:

    Oops, sorry, I misread you. Making field required conditionally, is not possible as such, but there is a work around that might work for you

    You could create 2 groups, one containing the required field and one containing the optional field. you could then add some conditions so the correct groups always appear.

    Keep in mind that your field names need to be different for both groups. So you will always get 2 fields posted, both the required and the optional one, but you can handle this in the email message with tags like [optinoal-group][/optional-group] and [required-group][/required-group]

    rgreenstreet

    (@rgreenstreet)

    Going on what Jules said:

    It’s not possible to say “if this is selected, then show make this field required”

    You would need to use the workaround to say “if this is selected, show the required field” and then “if the other option is selected, show the ‘same’ field, but it’s not required”

    Like he said, they would need to have different names/variables

    • This reply was modified 7 years ago by rgreenstreet. Reason: removed unnecessary word
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Checkboxes’ is closed to new replies.