Templating the Boolean Field

The Boolean field will add a switch for a true or false values for the content authors to pick from.

Get the boolean value

Here is an example of how to retrieve the value from a Boolean field which has the API ID switch.

$example = $document->data->switch
if ($example) echo 'This is printed if value is true.<br />';	

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.