How can I prevent values inside conditionally hidden sections from being cleared?

By: Doug Tree | Asked: 10/14/2024
ForumsCategory: How-toHow can I prevent values inside conditionally hidden sections from being cleared?
Doug Tree asked 3 days ago
https://formidableforms.com/knowledgebase/using-conditional-logic/#kb-conditionally-display-a-section

How can I prevent values inside conditionally hidden sections from being cleared?
Jason LoftusJason Loftus replied 2 days ago

I've never figured out a direct solution for this, but my own workaround has been to add hidden or administrator-viewable-only fields to the form and duplicate the value from the conditionally hidden fields (or conditionally hidden fields inside the hidden section) into those additional fields when the form is submitted. That way the value is at least retained and I can craft views, actions, and workflows accordingly.

It definitely makes everything a little more complicated and usually requires some PHP work depending on the workflow.

Doug Tree replied 1 day ago

Thanks Jason. I came across this solution on another discussion but wanted to find something easier as I will be creating many forms.

Would be nice if [frm-entry-update-field id=[id] field_id=y value="Updated"] worked for sections. Actually, I can’t get it to work for single fields (maybe there’s an issue with the current version)

2 Answers
Doug Tree answered 4 hours ago
I’d pay someone to fix this and share with the group.
Walter JonesWalter Jones answered 3 hours ago
Doug shoot me and email, I would be happy to take a look at this for you.  [email protected] .    
Doug Tree replied 1 hour ago

Thanks Walter. Email sent.

I’ll also explain here what I am trying to do. I have many long forms with several fields in multiple sections. I am using a parameter to select the section number [formidable id=1 section=3]. My form has a hidden field. We will call it targeted section which has a default value [get param=“section”]. Then I conditionally show each section (i.e. show section 3 when target section equals 3).

This works well for showing only the targeted section, however, when section 3 is filled out and updated (front end editing is turned on) all other fields in the other sections (hidden by conditional logic) are cleared.

Does that make sense?

I understand there are workarounds by using jquery and/or pages and/or embedded forms, however I am mostly interested in finding a solution which works with the form how I have it set up as explained above (unless there is another method that is equally as easy (fewer steps)).

Thanks!

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