How can I hide an HTML element when dropdown selection changes?

Hey guys,

I’m trying to build an automation using the Attended Framework. I’m using a Form and I would like to clean an HTML element when the selection from the dropdown is modified.

The HTML element is used to display an error message in case one appears in the subsequent activities.
Initially, on the first run, the variable containing the message is empty so the HTML does not appear. In case an error in an app occurs, the form is reloaded with all the information as it was completed by the user and the HTML element is now visible and displaying the error message in red.
If at this point, the user changes its mind and wants to change their selection in the dropdown list, I’d like the HTML element to be blank again and the error message to disappear.

Does anyone know how I can do this?

I understand that I have to perform advanced logic but I’m having problems writing the trigger with Javascript. Action should be “Type: Property, Component Property: Hidden, Set State: True” if I’m not mistaken.
I’ve found some examples in the documentation but none of them are exactly like this one.

The HTML element displays a message that is stored inside a dictionary in case it’s relevant. Cleaning the value for the key or hiding the element in the form would solve the problem

Thanks in advance!

Hi @Marco_Ber ,

Try to add conditional HTML element as per image below



Hi! Thanks for your answer!
The issue is that I would like to make it dynamic. I would like to be cleaned when the dropdown value changes to a new value. With the conditional, I can only use it for fixed values