Forums

Hide a dropdown value in email when a checkbox is unticked ?

CedricCQ 13 Aug, 2018
Hi !

I've an issue with checkboxes and events.

When the checkbox is ticked, a dropdown menu apears with a selection of things, and after I can see the selected value in my email (that's what I want), but when the checkbox is unticked, the dropdown menu doesn't apears on my website (that's what I want too), but I can see the value in the hidden dropdown menu in my email (I don't want to see that).

I've tried everything with "Events" in my checkbox settings to hide the dropdown menu value when it's unticked but it doesn't work. It's a bug ? What can I do ?

Thank you very much.

Cédric
GreyHead 14 Aug, 2018
Hi Cédric,

You either need to disable the dropdown element when it is hidden (the it won't submit a value); or you can check the values after the form submits and unset any invalid values from the form data.

Bob
CedricCQ 14 Aug, 2018
Thank you Bob,

I've tried to do this, but it doesn't work, can you tell me if something is wrong in the settings below ?




I don't understand why it doesn't work.

Thanks,

Cédric
healyhatman 14 Aug, 2018
You can use a custom code action set to return car only and HTML / PHP code to create the email exactly how you want it, then in the email action use {var: customcodename}
CedricCQ 14 Aug, 2018
Thanks healyhatman.

But I don't understand why it works with 2 text fields and doesn't with one checkbox and one dropdown.

This is a working exemple on my website if the value is not equal to "SUMMER2018" the "rabais" element isn't displayed in the email.




Thank you,

Cédric
This topic is locked and no more replies can be posted.