Enable Unselectable Radio Buttons in Forms
This JavaScript snippet allows users to deselect radio buttons in JetFormBuilder forms by clicking an already selected option. It applies only to fields with the CSS class allow-unselect, making form interactions more flexible.
Specifications
Enable Unselectable Radio Buttons in Forms
5 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the entire code snippet to your clipboard.
- You can add the snippet in one of two ways:
-
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 snippet of the appropriate type:
- JavaScript snippet → paste JS without <script> tags
- CSS snippet → paste CSS without <style> tags
- Save and activate the snippet.
-
Option B: Using Theme Files or a Custom HTML Widget
- Navigate to WordPress Dashboard > Appearance > Theme File Editor.
- Open an appropriate theme file (for example, header.php or footer.php), or add a Custom HTML widget in the desired area.
- Paste the code snippet:
- Keep <script> tags for JavaScript
- Keep <style> tags for CSS
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to give users greater control in form inputs where optional or toggle-like radio selections are needed, improving form flexibility and UX in surveys, preferences, or conditional inputs.
Applicable scenarios:
- Surveys or feedback forms requiring optional radio selections.
- Preference selection forms with toggle behavior.
- Forms needing improved user experience for radio inputs.
Specifications
Enable Unselectable Radio Buttons in Forms
5 January, 2026
-
Plugin
-
Category
-
Programming languages