Nutshell Form – Hidden Input field for Select Option Element

Posted by: Nico Cagalitan Date Posted: October 30, 2025
Back to Case Studies

Issue

Nutshell forms select option element already has a value (a random string dynamically added), and it’s being pulled in LeadManagerFX. The client wants a more friendly-named data value instead of the raw value.

Solution

Constructed a custom code, adding a mutation observer to check if the form is loaded. Once the form loads, the code will add a hidden input field to house the select options a user chooses, using the label instead of the raw value. Also, added an error catcher and a checker to see whether the hidden field is already added.

Achievement

Able to add a hidden input field for Nutshell Forms to capture the select option element using the labels instead of the raw value

Snippet/Screenshot/Link

Ticket: https://app.webfx.com/todos/266907329

Code: [screenshot] [screenshot 2]