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.
-
Plugin
-
Category
-
Programming languages
Installing Instruction
How to Add Snippets into the functions.php File of the Active Child Theme
- Copy the required code snippet to your clipboard.
- Navigate to WordPress Dashboard > Appearance > Theme File Editor.
- Click the functions.php tab to open the file.
- Paste the code snippet below the existing code in the Selected file content: area.
- Click the "Update File" page.
Installing Instruction
How to Add Snippets Using Code Snippets Plugin
- Copy the required code snippet to your clipboard.
- Go to WordPress Dashboard > Code Snippets > Add New.
- Enter the snippet’s title into the corresponding field.
- Paste the code snippet into the empty editor area of the functions.php tab.
- 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.
-
Plugin
-
Category
-
Programming languages