Conditional Visibility with Multiple Values Not Working

Hi everybody,

I’m trying to configure conditional visibility for a form field based on the value of another field.

Desired Logic

Show Field B only when Field A has one of the following values:

“Option 1” or “Option 2”

What I tried:

elements.FieldA.value == “Option 1” || elements.FieldA.value == “Option 2”

But this doesn’t seem to work - Field B stays hidden, even when one of the target options is selected.

Setup details:

  • Using Single Select for Field A
  • Field keys are correct
  • Tried with and without JavaScript mode
  • Tried both == and ===, with and without return
  • Avoided .includes() as I understand it’s not supported

Question:
What is the correct way to conditionally display Field B, based on Field A having multiple possible values?

Thanks in advance - any help appreciated!

Hi. You can try to use this formula OR(elements[“Text Field”].value==“Option1”,elements[“Text Field”].value==“Option2”). The component will show up if the text value is Option1 or Option2

1 Like