Add “Contains Any” Condition to Form Action Rules

This code snippet adds a new condition operator to JetFormBuilder’s action conditions that checks if a field’s value contains any value from a provided list. It allows more flexible conditional logic when processing form actions by matching partial values inside a string.

Specifications
Add “Contains Any” Condition to Form Action Rules
6 January, 2026
  • Plugin
    • JetFormBuilder
  • Category
    • Dynamic Content
    • Forms
  • Programming languages
    • PHP
Source code

Installing Instruction

How to Add Snippets into the functions.php File of the Active Child Theme

Attention: Create a site backup before applying any changes to functions.php.

This ensures that you can restore the website if something goes wrong after adding the code snippet.

  1. Copy the required code snippet to your clipboard.
  2. Navigate to WordPress Dashboard > Appearance > Theme File Editor.
  3. Click the functions.php tab to open the file.
  4. Paste the code snippet below the existing code in the Selected file content: area.
  5. Click the "Update File" page.

Installing Instruction

How to Add Snippets Using Code Snippets Plugin

You can also add a code snippet using any third-party snippet plugin.

For example, we will use the Code Snippets plugin.

  1. Copy the required code snippet to your clipboard.
  2. Go to WordPress Dashboard > Code Snippets > Add New.
  3. Enter the snippet’s title into the corresponding field.
  4. Paste the code snippet into the empty editor area of the functions.php tab.
  5. Click "Save Changes and Activate" to save and enable the snippet, or "Save Changes" to save the snippet without activating it.

Example Use Case

Use this snippet to add a "Contains Any" condition to JetFormBuilder form action rules. It checks if a field’s value contains any of a list of specified strings, enabling flexible conditional logic.
Applicable scenarios:

  • Form logic customization: Trigger actions based on partial match of input values.
  • Marketing campaigns: Apply rules processing multiple triggers efficiently.
  • Conditional workflows: Handle complex form conditions with multiple possible values.
Specifications
Add “Contains Any” Condition to Form Action Rules
6 January, 2026
  • Plugin
    • JetFormBuilder
  • Category
    • Dynamic Content
    • Forms
  • Programming languages
    • PHP
Source code

Let’s build together

Have your own solution?

Came up with a great solution and want to show it to the Crocoblock community?

Request a new feature

Leave a feature request through GitHub, and our developers will consider it