0

I am having a weird issue in a Freeform Pro edit form. I'm using Freeform Pro v.4.2.5 and EE 2.11.2

I think I'm missing something obvious. In my jsfiddle, when Radio Option 1 is clicked , the two drop down menu fields are required. When Radio Option 2 is clicked, the two drop down menus are hidden and their values, if any were selected, are removed.

This works fine.

My problem occurs when I edit a record. If I had clicked Radio Option 1 and then two options from the select menus; if I go back and edit the record and choose Radio Option 2, while the select options are removed in the form, they are not deleted in the database.

Any ideas what I am missing?

I thought the code below removed the value from a select menu but it only saves the removed value from textfields.

$('#state_2').val("");

I also tried the code blow but it did not work either.

$('#country_2').prop( "selected", false );

Any help is appreciated, even if to let me know I'm missing something super obvious! Thanks Peter T

0

I have avague recollection of hiding fields in forms not being updated. Try editing your forms with the non-required fields visible.

If that doesn't work then I vaguely recall submitting forms in EE with empty fields does not update the dB. Try putting in irrelevant/false content ie. none. You can then search those fields for content = 'NOT none'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.