If Statements with Block Control Values

Is it possible to do <If> statements with control values?

If so, how would this be done with legacy controls and how would it be done with the new controls?

( I’m mostly interested in hiding stuff when a control isn’t filled in.)

I tried just doing <If field="control_name" exists> but that didn’t work…

Just for shits and giggles, also tried these but no dice haha. But the <If control=" "> syntax seems to only be for inside the controls, not in the template itself…

<If control="control_name" exists>
<If control="control_name" value=exists>
<If control="control_name" value="something">

Adding <If control=> syntax for the template tab is on the roadmap! It can be used to hide controls based on other control values in the Controls tab already. For now, here’s how to test control values in the template tab:

Old syntax:

<If check="{{ control_name }}">
<If check="{{ control_name }}" value="something">

New syntax:

<If check="{Get control=control_name}">
<If check="{Get control=control_name}" value="something">
1 Like

Perfect. That worked. Thank you!