Run Custom Script When a Form is Submitted
This snippet allows you to trigger custom JavaScript actions after the JetFormBuilder form is submitted. It listens for form submission events and can be used to execute additional logic, such as logging data, sending custom requests, or interacting with other scripts.
Specifications
Run Custom Script When a Form is Submitted
6 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the provided JavaScript code snippet to your clipboard.
- Add the code using one of the following methods:
-
Option A: Using a Custom Code Plugin (Recommended)
- Install and activate a plugin such as WPCode Lite, Code Snippets, or Simple Custom CSS and JS.
- Create a new JavaScript snippet.
- Paste only the JavaScript code, without <script> tags.
- Save and activate the snippet.
-
Option B: Using a Custom Code / HTML Area
- Add the code in a Custom HTML widget or directly into a theme file (for example, header.php or footer.php).
- Keep the <script> tags when using this method.
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to execute custom JavaScript actions immediately after a JetFormBuilder form submission.
Applicable scenarios:
- Marketing sites: Trigger tracking pixels or analytics events.
- Custom integrations: Send form data to third-party services dynamically.
- Interactive forms: Dynamically update UI elements on submission without reload.
Specifications
Run Custom Script When a Form is Submitted
6 January, 2026
-
Plugin
-
Category
-
Programming languages