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.

Require conditional fields only if visable

  1. I have two conditional fields that are controlled by a dropdown. For example if "email" is selected an e-mail input is showing if "phone" is selected the phone input is showing. I want the user to be required to input either a phone OR e-mail depending on what is selected in the drop down. The problem is if I select "required" for both phone and e-mail GF wants to require both even though one is hidden.

    I think this may be a bug. The solution would be ONLY validate the field if it's visable. Unless someone has a better solution I'm going to use custom validation/regex to require one field.

    Two question, is this a bug? and is there a better way to fix it?

    Posted 13 years ago on Thursday April 14, 2011 | Permalink
  2. I recant this post. I had another problem in my functions.php which was causing the problem. All is well now :)

    Posted 13 years ago on Thursday April 14, 2011 | Permalink

This topic has been resolved and has been closed to new replies.