Forums

2 questions about checbox Events

yorai85 21 Apr, 2015
hello dear support team,
i have 2 small questions about the conditioned display of form fields, based on form evetns.

i have a form with a checkbox field with many options.
2 of the options, when checked - are suppose to open a new field.

iv'e managed to do it using the "events" tab of the checkbox field, and setting the new field to load as "hidden".
but i have 1 problem - the hidden field label is dispayed on load. only the field input is behaving as needed (hidden, and the shown when the relevant box is checked).

2nd question - can i hide the field again, if the user un-check the specific checkbox?

thank you very much,
Yorai Ronen
Max_admin 22 Apr, 2015
Hi Yorai,

#1- please use "hide parent" instead of "hide"
#2- yes, just add another event to hide when "uncheck".

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
yorai85 23 Apr, 2015
Hi Max,
thank you for the help.

i've done as you suggested, the new field is now shown correctly, but it isn't hidden again when the specific checkbox is un-checked.

this is not criticatl for me, but if there is a solution without a major work-around then it would be the best thing.

iv'e attached a screenshot of the current event configuration of the checkbox field.
the first line is the event for showing the field, and is working great. the 2nd is for hiding it and it isn't working.

thanks
yorai
Max_admin 23 Apr, 2015
Hi Yorai,

This event setup should do what you need, do you have the latest update installed ?

There is a demo-fields-events form, please try to test it, it has something similar with the "other" checkbox.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
yorai85 24 Apr, 2015
Hi Max,
i was using CF 5.0.2. upgraded to 5.0.9 - the field still isn't hidden when the box is un-checked - but i'm still using joomla 3.3 and not 3.4 - so it might be related to this. i will upgrade to 3.4 in the near future, since i'm waiting for other extensions to be 3.4-ready.

the demo form is working good, but is using a radio-buttons with 1 choice, and i'm using a checkbox with multiple choices.

thanks for the help.
Max_admin 29 Apr, 2015
Hi Yorai,

I have just tested this here:

1 checkboxes group, default Yes and No (case sensitive), and 1 textarea, I setup 2 events in the checkboxes group settings to disable/enable the textarea and it works as expected.

Please create a new test form and try that, if it doesn't work then please attach the test form backup here.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.