Forums

checkbox and conditional text field

kraadde 01 Mar, 2023
I have a problem.
I have inserted a checkbox and a conditional text field into my form.
The checkbox is set as empty. The text box is also set as hidden to be shown only if the checkbox is checked.

When the form is opend in the front view the text field is shown.
When checkt and unchecking the box, it works as planned. Why not at opening?

any hint please.
winchesterlyon 01 Mar, 2023
You could try setting the text field to hide and disable validation when the checkbox field loads (Ready).

https://pasteboard.co/EzKTuS4935ED.png

Also, if the text field is in a different area (container, multi-field, etc), you should apply the same event conditions to the area as well. It works some times without doing this step, but sometimes it does work unless you do this.
kraadde 02 Mar, 2023
Does not work. Attached a backup of the form. Maybe you may help solving ?

The problem:
After selecting any dropdown option the form field appears.
The checkbox_97 is unchecked (as supposed to be!) but the field_textarea_113 is shown as well which is not the intention.
From that on, the hiding and showing of the text area works.

Any help, please.

Regards
Adriano

See download form on the following:

https://www.dropbox.com/sh/z6ft5t75qe0xiv5/AABRDLhvbd2kCzCt_tQv_Adwa?dl=0
winchesterlyon 02 Mar, 2023
1 Likes
Hi Adriano,

Try this.
https://pasteboard.co/3JRAN5O1nV6g.png

The problem wasn't really the events that you had set. The problem was the container's events. The Container and the fields it contained are hidden when loaded and when a selection in made from the drop-down, it removes ALL hidden field inside of the container. So, in order to keep the textarea (field_textarea_113) hidden after a selection in that drop-down, you have to add an event to keep the hidden state when it changes.

I'm not sure if this is how it is supposed to work, but this fixes that issue of the events inside of the container..
kraadde 03 Mar, 2023
Thanks, now it works!
You need to login to be able to post a reply.