[SOLVED] Conditional fields

winchester

Member
Hi,

I'm not sure if this is what it's called, but it's simple to explain. I have a textarea element that I want to load hidden and then show then a specific answer is selected either in a radiobutton or checkbox element.

I figured that this should be done on the JavaScript page.

I added 3 JS events the first one to hide the child element (because it's a textarea and doesn't have a "hide field" option) and the other 2 to show the child element when the "Yes" option is selected and to hide the element again when anything other than "Yes" is selected. See screenshots below.

The form loads with the child element hidden, but whenever yes is selected, it doesn't show at all.

Any idea how to fix this or am I doing this incorrectly?

farik-js-01.jpg farik-js-02.jpg farik-js-03.jpg
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top