Checkbox condition

ce cefilios 29 Jan, 2022
I am having a hard time adapting to the new V7 UI. Hopefully it will make sense soon.

In Actions I added Advanced > PHP with some echo statements. If I run the form with just the PHP, it works fine. However, if I add a Run Condition nothing displays (whether or not the box is checked.) I'm not sure what the Condition field expects and what the value field expects.

I have tried several variations of the field name in Condition, including $this->data('subscription'), and tried 1 and 'yes' in the condition.

My goal is to have the PHP executed only if the subscribe check box is checked.

Any help will be appreciated
Co Colnem 29 Jan, 2022
1 Likes
Hi

For a behavior run condition controlled by a var value, use {var:value} = 1
For a behavior run condition controlled by a data value, use {data:value} = 1

Bye
ce cefilios 29 Jan, 2022
Thanks, it works now. I must have had a typo the first time I tried it.
This topic is locked and no more replies can be posted.