There are scenarios where users need to use a Checkbox as a condition on Advanced PDF/HTML Templates.
To apply a condition on the Source code editor we need to use the If condition statement. To apply this condition to a checkbox, the code should be like this:
<#if record.custbody1 == true>
<!-- do something if checked -->
<#else>
<!-- do something if unchecked -->
</#if>
Kindly check a sample scenario below:
The template will print Checked if the Custom Checkbox is checked, otherwise, it will print Not Checked:
Since the checkbox in the record is not checked, the template printed Not Checked.
Let us know if you have questions.