Retainin numeric input in hidden fields

By: A M | Asked: 07/13/2024
ForumsCategory: General questionsRetainin numeric input in hidden fields
A M asked 4 months ago
I would like to allow the website visitor to reduce clutter selectively to maintain focus in two ways. FIrst, I want them to be able to expand and collapse sections that contain fields where they have entered numeric input that is used in computed fields. Second, I want then to be able to flick a toggle button that will selectively hide numeric input fields throughout the form. Unfortunately, it looks like when both of these methods are given to the visitor, they each result in the numeric data captured in those fields getting lost. Is there any way to give the visitor the option to hide fields while retaining the numeric values entered in those fields?
1 Answers
Rob LeVineRob LeVine answered 4 months ago
Collapsing a section doesn't stop values from being saved, so there's more to your issue. In the case of hidden fields, if you use Formidable's conditional logic to hide a field the value won't be saved because the field is removed from the DOM. You'll have to use jQuery to hide the field while keeping it in the DOM to write its value back to the DB.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right