Does anyone actually have an If statement working using from=options
? If not, I would say there’s a bug with the logic because I’ve tried many different approaches with no luck. 
For reference:
-
<Field xxx from=options />
returns 1 or 0
-
<Field acf_true_false=xxx from=options />
returns TRUE or FALSE
The above tags work fine, but using <If...>
and from=options
always breaks no matter how I write the syntax. E.g. <If field="xxx" from="options" is value="1">
I also tested with an ACF text field and could not get it to work, so this may be a general bug with <If...>
and from=options
.
As suggested, the workaround is to set the ACF value with a local that can be seen by the If statement. This logic definitely works:
<Set local=acf_check_value>
<Field xxx from=options />
</Set>
<If check="{Get local=acf_check_value}" is value="1">
<p>Field returned 1</p>
<Else />
<p>Field returned 0</p>
</If>