Validate Conditional Fields

Test conditional fields in visible and hidden states to confirm required rules, error messages, and submitted values behave as expected.

When a conditional field is hidden, it should not block a visitor from submitting the form because of a required value that is no longer relevant. Smart Form Builder’s frontend logic removes the required attribute from hidden conditional inputs and clears their displayed validation errors. The submission handler also evaluates the configured conditions before processing field values.

Configure validation for a conditional field

  1. Configure the target field’s condition in Advance → Conditional Logic. See Configure Conditional Field Logic for the control details.
  2. Set the field’s required status or other supported validation options.
  3. Save the form and open the frontend preview or published page.

Test both visibility states

  • When the field should appear: choose the triggering answer, confirm the field becomes visible, leave a required value empty, and verify that validation prevents the form from proceeding or submitting.
  • When the field should be hidden: change the triggering answer so the condition no longer matches. Confirm the field disappears and its required status no longer blocks submission.
  • When the answer changes again: make the field visible once more and confirm its required validation is restored.
  • When the form is submitted: verify the saved entry contains the values expected for the selected answer path, and that data from fields excluded by their conditions is not processed as an applicable answer.

Check common configuration mistakes

  • Confirm Enable Logic is turned on for the target field.
  • Check that Condition Field ID matches the configured ID of the field that supplies the answer.
  • Check the operator and comparison value against the value actually submitted by the source field.
  • Test each answer path, including empty values and multi-select answers when used.

Do not rely on a hidden field as a security control. Conditional visibility is a form-flow feature, not a way to protect secrets or authorize access to data.

Screenshot to add: Conditional field settings alongside a frontend example showing the field in its visible state

Back to Conditional and Multi-Step Forms