Creating a conditional confirmation page or confirmation email for your LGL form

In this article:

IMPORTANT NOTE: It's possible to use the liquid templating language if you have programming experience or access to someone who does. Creating the conditional confirmations themselves is not a service that Little Green Light provides.

When to use a conditional confirmation page or confirmation email

Only one confirmation page or email can be defined for any given LGL form, but in some cases you may want to provide multiple versions of a confirmation message for a single form.

Using conditional logic within your confirmation page or confirmation email allows you to configure to a limited degree when a specific message for your form will sent to the user. 

When you've created the conditional logic so that it works as expected, you'll then add it to your confirmation page or confirmation email within the Confirmation options for your form.

For the Confirmation page, the conditional logic goes in the Confirmation page text pane:

For the confirmation email, the conditional logic goes in the Content pane:

Understanding conditional logic

Typically, you will add two message options for your confirmation page or confirmation email, using conditional logic to define when one message or the other should be sent.

Say, for example, that you want to be able to send a confirmation email for a one-time donation that is different from a confirmation email for a recurring donation.

For a form that supports both recurring donations and one-time donations, you can use the following logic: 

{% if is_recurring == 'Yes' %}
If this is a recurring donation form, then put a custom message to recurring donors here
{% else %}
Thank you for your one-time donation.
{% endif %}

NOTE: Using conditional logic is possible because confirmation pages and emails include support for the Liquid Templating language, developed by Shopify. (Specifically, this section of the Shopify documentation is probably the most useful: Control flow.)You can use the full range of liquid syntax as defined in the document, but, most commonly, simple if/else statements should do the job.

Customizing your text in the conditional logic

When building conditional messages, we recommend using the following approach: 

1. Create a submission (without paying, if payment is involved)

2. From the submissions list, click the "View confirmation page" link. If you're testing an unpaid transaction, you'll see the View confirmation page option:

3. In a new tab, go to the Confirmation Page tab, and work on your logic within it (we recommend this because it's easy to preview your page from the confirmation page, but it's not as easy to preview a confirmation email)

4. Return to the confirmation page (from step 2) and refresh your browser to view how the text looks

5. Repeat this process until the message displays the way that you want. If you're sending an email confirmation, you can then copy the confirmation page content into the confirmation email's Content pane:

Please remember to save your changes, and note that you can also send a test email from here:

Still need help? Contact Us Contact Us