Conditional provide complex and dynamic functionality for Webforms. The most common use is to make one or more fields on a form visible or invisible based on selections of other components, in combination with the Page Break Component.
A simple feedback form contains a Select Options Component that asks if the user is willing to be contacted further. The component has 2 options: Yes and No.
- If the user selects Yes, the form displays a second page with additional contact information input fields (Email Component, Textfield Component for a phone number, etc.) which the user fills out before finally submitting the form
- If the user selects No, the form is submit without showing the additional contact information page.
Create Conditional Content
- Create components
- Click the 'Conditionals' button next to the 'Form Components' and 'Emails' buttons
- Click 'Add a new condition' and enter the relevant rules for each relevant field:
If <Component Name> <Is / Is not / Contains / etc...> <Some Value>
then <Component Name> <Is / Isn't > <Shown/Required/Set to>
To create feedback form like the example listed above, the necessary steps would look like:
- Create Select Options Component (name "Contact Further")
Key-value pairs: 1|Yes, 2|No
- Insert Page Break Component after "Contact Further"
- Create Email Component (name "Home Email") after the Page Break Component
- Add Conditional as follows:
If <Contact Further> <is> <Yes>
then <Home Email> <is> <shown>