clear_on_hide not working
-
The Form Elements I am using:
[checkbox checkboxQs "group-none" "group-coh" "group-inline" "group-both"] [group group-none clear_on_hide][text text-693][/group] [group group-nested][text text-62][date date-476][/group]And the corresponding conditions:
show [group-none] if [checkboxQs] equals "group-none" show [group-nested] if [text-693] equals "show"Code-snippet for Reference:
if ($group.attr('data-clear_on_hide') !== undefined) { $(':input', $group) .not(':button, :submit, :reset, :hidden') .val('') .prop('checked', false) .prop('selected', false); }What I am essentially trying to do: when hiding the group-none group, hide the group-nested group as well. That should, as I understand it, be happening (almost*) on it’s own after the value of text-693 has been cleared using the group’s clear_on_hide attribute and the appropriate function. (*I would need to call the display_fields() function again after clearing the input fields (that function makes the fields dis- and appear)
Using Google, the debug menu from Chrome and some editing in the script.js (which has been reversed now), I have been able to determine that when using the jQuery Selector, the “text-693″ input field is emptied by .val(”);. But using document.querySelector(“Selector for the text-693 input”), the value stays, even after being supposedly cleared by .val(”);. Also, when showing the group-none group again, the value of the text-693 input is still present.
One maybe noteable thing: The form is not public on the website, it’s still a private page.
After looking for some time, I have still not found what could be the problem here. I would be very greatful for assistance, as I have seemingly reached the ceiling of my expertise.
Thank you!
The page I need help with: [log in to see the link]
The topic ‘clear_on_hide not working’ is closed to new replies.