JS in element "onchange", "show", shows groups, but not elements

nrsmoll

Member
Hi,
I have a form, "visits", which has several related forms, with groups labelled "Outcome A", "Outcome B", and "Outcome C".
I have hidden ("Yes, but 'Hidden'") all the "Outcome" groups, in the Edit Groups section, under Layout>Show Group. I have a "yesno" element ("yesno_element") that allows for me to click "yes/no" if there are outcomes needed. "no"/zero is the default.

This "yesno" element has JS: "onchange" "show" Group:"Outcome X" if "yesno_element" ==1

My expectation was that by selecting a group, the JS would show the group and therefore also show the elements associated with the group.

However, it shows the group, but not the elements associated with the group.

Do I have to add JS to show all the elements as well? (I really hope not, because that is alot of clicks)
 
I did just have to apply this fix in the JavsScript:

https://github.com/Fabrik/fabrik/commit/9424352615e0bd528b990044441cb6ca548e6b0d

I'm not quite sure how your group shows without this fix. The "show" feature in the element JS uses a different method to hide and show the group - it sets the 'visibility' attribute, whereas the "Yes, but hidden" setting applies display="none". So I had to add something to the group FX handling to do bot (set visibility and display).

But after this fix, it should behave as you expect. I have a test case here, with exactly the same setup. A yesno button that controls showing/hiding a group, and a group set to "Yes, but hidden", and when I show the group with the yesno, the elements are displayed.

Do you have anything else going on that might hide the individual elements?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top