PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Give conditional logic fields the ability to be required

  1. jcmilton
    Member

    I love the conditional logic implementation that Gravity forms has. Very easy to use. However, it would be great if the conditional fields could be made to be required if they are activated. Does that make sense?

    Example:
    1. Do you own a dog? (YES or NO)

    2. If NO, then display the question "Do you own a cat?" (Here is where you should provide a checkbox to make this a required field, but only if it is activated by Question 1.)

    3. If YES, then display the question "What color is your dog?" (Likewise, here is where you should provide a checkbox to make this a required field, but only if it is activated by Question 1.)

    Thanks!

    Posted 14 years ago on Saturday July 10, 2010 | Permalink
  2. I believe that is exactly how the conditional logic works now, unless I missed something. I made a quick form here:

    http://guitar.chrishajer.com/2010/07/10/do-you-own-a-dog-or-cat/

    Unless my understanding of the problem is wrong.

    If you mark a field required, but it's not displayed due to a conditional logic rule, it doesn't foul things up be being required. It's only required if it's visible.

    I think I would probably word the form differently though, to avoid the problem altogether.

    What type of pet do you want to tell us about?

    [ ] Dog
    [ ] Cat
    (one or the other is required)

    What color is your pet?
    [_______________________________________________________]
    (required)

    In any case, my understanding is that required conditional fields work exactly like you think they should. Was your experience different?

    Posted 14 years ago on Saturday July 10, 2010 | Permalink
  3. jcmilton
    Member

    "If you mark a field required, but it's not displayed due to a conditional logic rule, it doesn't foul things up be being required. It's only required if it's visible."

    Ahhhh.... OK. I guess that wasn't immediately obvious.

    I was worried that any field that was marked "required" would be required whether it was visible or not.

    Thanks for pointing that out!

    Posted 14 years ago on Sunday July 11, 2010 | Permalink
  4. If a field is hidden by conditional logic but was also marked as a required field, it shouldn't trigger validation. Only visible fields should trigger validation.

    Posted 14 years ago on Sunday July 11, 2010 | Permalink