How to make an input required dinamically

  1. My goal: I have a form (inside a multi-step) and I want to set some inputs in step 7 to be required (or not) dynamically, based on an answer from step 1.
  2. Issue: The “Required” validation can’t be set as an expression, so I can’t fill it with something like “{{ step1input.value === true }}“.
  3. Steps I've taken to troubleshoot: I tried to create a query, triggered in step1Input, which sets step7Input.required = true, but it doesn’t affect step7input at all. It is still not required.

Is there a way to set a field as required dinamically?

For anyone with the same doubt, when you hover over the “Required” validation rule, there appears an FX (sic) text:

image

this text is clickable and changes the checkbox into a text input, in which you can set dynamic conditions for this input to be required.

Thanks for following up, @ironsand!

1 Like