How can I string multiple conditions together using the Advanced Editor?

In Cognito Forms, you can use if/then statements to enable a variety of both simple and complex scenarios on your forms. You can also combine these statements to set specific conditions based on your own custom criteria. For example, you can display multiple different messages depending on whether participants can attend your event or not.

To create a string of multiple if/then statements:

  1. Add a Choice field to your form (ex: ‘Will you be attending?’) with the options ‘Yes’, ‘No’, and ‘Maybe’.
  2. Add a Calculation field to your form. In the advanced editor, you can enter a series of if/then statements, separated by ‘else if’. Ex: =(if WillYouBeAttending = "Yes" then "We can't wait to see you there!" else if WillYouBeAttending = "No" then "We wish you could come!" else if WillYouBeAttending = "Maybe" then "We hope you can make it!" else "")
  3. Save your changes. Now, a custom message will appear when a specific choice is selected.

Learn more about using calculations.

Support