The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Make required field "either/or"
I'm using a form to collect customer data and I want to make it so that the user cannot submit unless they enter a phone number into the phone number field OR an email into the email field. Is there a way to make the fields required but in an "either/or" option. So if they enter a phone number the e-mail field is not required or if they enter an e-mail then the phone number field is not required?
December 27, 2018 at 1:08 am
You have to use custom code to achieve this type of validation. If you want to write it in PHP, you can use the frm_validate_field_entry hook: https://formidableforms.com/knowledgebase/frm_validate_field_entry/#kb-conditionally-require-a-field
You can also handle this kind of validation at the browser level with jQuery, which may be the easier way to do it.
Discussion closed.