Control Actions With Conditional Logic – WS Form

Control Actions With Conditional LogicPRO

By default an action will run when a form is submitted or saved. It is also possible to control when actions run by using conditional logic. This enables you to do the following when a condition is true (or not true):

  • Run an action when the form is submitted or saved
  • Do not run an action when the form is submitted or save
  • Run an action immediately

You can choose any action you wish for these scenarios, such as sending an email, pushing data to an email marketing service, pushing a message to a Slack channel or even running a WordPress hook. The possibilities are endless!

Demo

Choose a tab below to see how to set up each of these scenarios:

Run on Submit / Save

In this example we will show you how to run an action when a condition is met and the form is submitted.

  1. Click the ‘Conditional Logic’ icon at the top of the layout editor.
  2. Create an IF condition that, when true, will enable the action. In this example, we’ll enable the action when a radio with the label ‘Radio 1’ is checked:Action - If Condition
  3. In the THEN statement, select the action you want to run when the form is submitted. In this example we choose an action called ‘Send Email (Option 1)’ to be enabled when the form is submitted. You can also choose to enable the action when the form is saved. Action - Then Condition - Run
  4. In the ELSE statement select the same action and set it to ‘Do not run when form submitted’. This will disable the action when the IF condition is false.
  5. Click ‘Save & Close’.

Do Not Run on Submit / Save

In this example we will show you how to not run an action when a condition is met and the form is submitted.

  1. Click the ‘Conditional Logic’ icon at the top of the layout editor.
  2. Create an IF condition that, when true, will disable the action. In this example, we’ll disable the action when a radio with the label ‘Radio 1’ is checked:Action - If Condition
  3. In the THEN statement, select the action you want to disable when the form is submitted. In this example we choose an action called ‘Send Email (Option 1)’ to be disabled when the form is submitted. You can also choose to disable the action when the form is saved.Action - Then Condition - Do Not Run
  4. In the ELSE statement select the same action and set it to ‘Run when form submitted’. This will enable the action when the IF condition is false.
  5. Click ‘Save & Close’.

Run Immediately

In this example we will show you how to immediately run an action when a condition is met.

  1. Click the ‘Conditional Logic’ icon at the top of the layout editor.
  2. Create an IF condition that, when true, will immediately run the action. In this example, we’ll run the action when a radio with the label ‘Radio 1’ is checked:Action - If Condition
  3. In the THEN statement, select the action you want to run immediately. In this example we choose an action called ‘Send Email (Option 1)’ to be run. You can also choose to run the action when the form is saved.Action - Then Condition - Run Immediately
  4. Click ‘Save & Close’.