Skip to content
redirection-for-contact-form-7

Contact Form 7, now with brains – run actions after submission: trigger scripts, webhooks, CRM sync, and conditional logic.

See Pro Plans →

Using Conditional Logic Redirect for Contact Form 7

Conditional Logic is one of the most prominent features in Redirection for Contact Form 7 (available in the Starter plan).

Webmasters often find themselves in need of performing a specific action after the form has been submitted – it can be a simple redirection to a thank you page, emailing to an address of their choice, 3rd party integration, payment requests, and much more.

With our Redirection for Contact Form 7, you can easily perform all these actions. However, imagine a scenario where you need to perform a specific action according to the user’s input in the form. With the Conditional Logic feature, this will be a walk in the park, no coding knowledge needed.

How to install it

  1. Download the Redirection For Contact Form 7 Extension - Conditional Logic plugin from your purchase history.

  1. Install the plugin on your site.

Need help installing a plugin? Check this doc for step-by-step details.

  1. In your WordPress dashboard, navigate to CF7 Redirection > Dashboard > Licenses and activate the license. ( The license is also available in your purchase history ).

How to use it

  1. Edit the C7 contact form of your choice.
  2. Navigate to the Actions tab.
  3. Click on the Add Action button to add any action of your choice.

  1. For that action, click to Enable Conditional Logic.
  2. Add the rules of your choice.

The plugin allows adding numerous conditions per action, and supports AND/OR relations. Also, the plugin supports a wide range of comparison types: equal, non-equal, contains, does not contain, less than, greater than, is empty, and is not empty.

Troubleshooting Performance Issues

When you have a large number of conditional rules (roughly 10 or more), the plugin must evaluate all of them on every form submission. This can exhaust the PHP memory limit on your server, causing a 500 Internal Server Error or the form appearing to spin indefinitely without completing.

Symptoms

  • The form submission returns a 500 Internal Server Error.
  • The form appears to load or spin for a long time after the user clicks Submit, then fails silently.
  • The error occurs only when Conditional Logic is enabled, and disappears when it is disabled.

Increase the PHP memory limit

If your server's PHP memory limit is below 256 MB, it may not be sufficient for complex conditional rule sets. Increasing the limit to 256 MB or higher is recommended when you have more than 10 rules configured.

How you increase the memory limit depends on your hosting provider. Below is an example using Cloudways:

  1. Log in to your Cloudways account and open your application.
  2. Navigate to Application Settings.
  3. Under the PHP FPM section, locate the memory_limit field and set it to 256M (or higher).
  4. Save the changes and submit the form again to confirm the error is resolved.

For other hosting providers, check their documentation for how to adjust the PHP memory_limit setting. Alternatively, you can add the following line to your site's wp-config.php file:

php
define( 'WP_MEMORY_LIMIT', '256M' );

⚠️ Important: If your hosting plan enforces a hard PHP memory cap, editing wp-config.php alone may not be enough. Contact your hosting provider to raise the server-level limit.

Isolate the problem by testing rule subsets

If you are unsure which rules are causing the issue, or if you cannot immediately increase the memory limit, you can test your rules incrementally to identify the problematic set:

  1. Temporarily disable all but a small group of your conditional rules (for example, the first 5).
  2. Submit the form and check whether the error still occurs.
  3. If the form submits successfully, re-enable the next group of rules and test again.
  4. Repeat until the error reappears — the last group you enabled likely contains the rules consuming the most memory.
  5. Review those rules for redundancy or opportunities to simplify the logic before re-enabling them.

💡 Tip: Reducing the total number of rules and combining related conditions using AND/OR logic can lower the memory overhead and improve form submission performance.