Show/hide OR

Hi guys,
I'm trying to do somethings that seems really simple but can't find the the solution in "how to" and "posts".

I'm creating a location (location_tbl)

  • first step i choose a type of location (type_loc tbl) and set a cookie
  • then i need to show/hide several inputs fields in my second step (form) according to the type_loc cookie value (inputs that are specific options..)

ie: if type_loc.id == '7' OR '9' OR '21' OR whatever.. (several identyfied values) > I want to show/hide the input.

How should I do to set my "dmx-show/hide"?
What is the correct way to set this kind of conditional?
I can't figure out using bind/formating panel and modifying code.

Thanks in advance.

Sylvain

Hello,
Your code should be:

dmx-show="type_loc.id == 7 || type_loc.id == 9 || type_loc.id == 21"

It’s standard js operators

1 Like

Super thanks :wink:
I bookmark the link!