Conditional Logic allows you to define what happens after the form is submitted.
The conditions evaluate the actual values entered by the user, tags or static values, giving you full control over the behavior of the form once it is sent.
This makes it possible to create highly dynamic and personalized workflows, such as:
- Show personalized messages: Display custom confirmations or feedback depending on the user’s input, making the experience more engaging.
- Prevent the form from being stored: Conditionally block the submission from being saved in the database, for example if certain criteria are not met or mandatory agreements are missing.
- Redirect the user to different pages: Send users to different URLs depending on their choices or form responses, such as a thank-you page, a membership portal, or a special offer page.
Using Conditional Logic in this way gives you flexibility and control over the submission process, allowing you to tailor the post-submission behavior to your exact requirements.
Practical examples
Do not store the form if the consent checkbox is not selected:
[if consent != "yes"]
[message type="success"]{settings.submit_success_message} The data sent will not be stored.[/message]
[else]
[message type="success"]{settings.submit_success_message}[/message]
[record]
[/if]Redirect based on a selected option:
[if plan = "premium"]
[redirect to="https://example.com/premium-thank-you"]{settings.submit_success_message} Redirecting...[/redirect]
[else]
[redirect to="https://example.com/thank-you"]{settings.submit_success_message} Redirecting...[/redirect]
[/if]