Working on a prototype for a form where the interaction needs to be:
- user can check a checkbox and a set of fields appears
- user unchecks the same checkbox and the set of fields disappears
My checkbox component is built with variants and conditional logic where “Yes” means the box is checked, and “No” means the box is unchecked. There’s also already a prototyping “Change To” interaction on them.
I created my boolean variables and set them to the fields I need to show and hide so that their Layer panel uses “showLayer” variables.
I’m running into the issue during prototyping when I try to use the Conditional interaction to set the “showLayer” variable to true or false AND also use the Change To interaction have the checkbox check and uncheck. It works for the first click (as in the checkbox will turn checked and the fields appear), but I can’t get the checkbox to uncheck and have the fields disappear on the second click. Only the fields show and hide but the checkbox remains checked the entire time. Screenshot attached of my prototyping interaction.
Any help is GREATLY appreciated! Thank you!!