FB: Silent error when required field is hidden by conditional
Overview
If you have a required field on an FB submission form, and it's hidden by a conditional, the form submission silently fails.
Reproduction steps
- Create a FB form in WP.
- Make a required field.
- Hide it with a conditional.
- Save the form and try submitting it when the required field is hidden.
Current behaviour
Silent failure. Most data is not saved to Civi (except in the AfformSubmission record).
Expected behaviour
Hidden required fields should be un-required. This is the behavior of Drupal Webform and other form builders. It's also the client-side behavior of FormBuilder, but the server-side "required field" validation fails.
Comments
Conditionals exist entirely in JS right now, PHP is unaware of them.