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

Slack Signup
Newsletter Optin
Help Desk

Workaround for excluded, but required fields in a form to prevent a validation error

Labels

This Discussion is public

Notifications

If you publish a form with some required fields on a page, but intentionally have to exclude those fields for some reason, the form won't validate.

On the other hand, if you conditionally hide required fields, they are no longer required and will not throw a validation error. So here is a very simple workaround:

  • Do not exclude these required fields, but include them.
  • Add another non-required field and set it to hidden or admin only. Leave it empty.
  • Add conditional logic to the required fields that hides them if the hidden/admin only field is empty.

Now the form will validate.

I can not get this to work...

I have a set of fields that are hidden, and get populated by an address validator.

I need the submit button to only work if the "find address" have been used and the address fields have been populated.

I can not believe that there is no solution for making hidden fields required to be populated.

 

Discussion closed.