Scroll to Top on Form Render State Changes
This JavaScript snippet ensures the page or form container smoothly scrolls to the top whenever the render state of a multi-step or single-step JetFormBuilder form changes.
Specifications
Scroll to Top on Form Render State Changes
7 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 keep users focused on the relevant form section as they navigate multi-page or dynamic forms, improving form usability and flow.
Applicable scenarios:
- Multi-step forms needing focus reset on step change.
- Single-step dynamic forms with conditional content.
- Enhancing user experience for lengthy or interactive forms.
Specifications
Scroll to Top on Form Render State Changes
7 January, 2026
-
Plugin
-
Category
-
Programming languages