Enabling Conditional Logic for Feeds

Summary

Conditional logic can be used to specify when a certain feed should process based on the form data. This is useful for subscribing users to mailing lists and sending payment information to different services.

Feed Settings

Enabling conditional logic for a feed can be done in the feed settings. This will need to be done for each feed associated with the form. If conditional logic is not configured, the form will process the first feed it finds.

Image showing Conditional Logic settingsfor a feed

Examples

Process a feed based on a field choice.

In this example, we use conditional logic to determine whether the form data should be sent to one of two payment services: Authorize.Net or Stripe.

First, we add a field to the form that allows the user to choose a payment method. We will use a drop-down field labeled ‘Gateway’ with the following choices: Authorize.Net and Stripe.

Image showing choices flyout that will be used for Conditional Logic settings

Then we create a feed for each service via the specific add on’s feed settings page. Conditional logic is enabled, and the criteria are set so that the gateway equals the appropriate payment method for that feed.

When the user is on the form, they will be presented with the Gateway field, which allows them to select which payment gateway they wish to use. Then, when the form is submitted, the conditional logic will determine where the payment information is sent. If they select PayPal as the Gateway, then the payment information will be forwarded to PayPal. If they choose Stripe as the Gateway, then the payment information will be sent to Stripe.

Process a feed if a field is not Empty.

For this case, you can use the “is not” operator, leaving the input field empty (the field value is blank). The example below would create a post using an Advanced Post Creation feed only if a field is not empty.

Image showing Conditional Logic settingsfor a feed