WS Form provides extensive options for managing form validation. Invalid feedback text, shown when a field is invalid, can be fully customized. Tabs can be configured to hide the next tab if the current tab does not validate. Furthermore, forms, tabs, sections and individual fields can also be tested for validity using conditional logic.
Form validation occurs when a ‘Submit’ button is clicked (or ‘Add To Cart’ if you are using the WooCommerce add-on).
Invalid Feedback Text
When a form is validated, any fields that do not validate will show invalid feedback text below that field. You can change the invalid feedback text that is shown as follows:
- Click the settings icon on the form field.
- Click the ‘Basic’ tab in the sidebar.
- Scroll down to the ‘Validation’ section.
- Enter text into the ‘Invalid Feedback Text’ setting.
- Click ‘Save’.
Tab validation prevents users from progressing to the next tab unless the current tab is validated.
To enable this feature:
- Click the form settings icon at the top of the layout editor.
- Click the ‘Advanced’ tab in the sidebar.
- Scroll down to the ‘Tabs’ section.
- Check the ‘Tab Validation’ setting.
- Click ‘Save’.
You can add conditional logic ‘IF’ conditions based upon whether a form, tab, section or field is validated. To do this:
- Click the ‘Conditional Logic’ icon at the top of the layout editor. The Conditional Logic sidebar will open.
- Click the add ‘+’ icon.
- In the ‘IF’ condition, select ‘Form’ or a tab, section or field.
- Select ‘Validated’ or ‘Not Validated’.
- Complete your ‘THEN’ and/or ‘ELSE’ statements.
- Click ‘Save’