Display Dependency on Print Format

I have a checkbox that if checked displays a custom HTML field and it works in the form. In the Display depends on (JS) I have “eval:doc.field == 1;” But no matter what I try, The custom HTML field on the print format always displays. Is there a way to only make it display when the checkbox is checked like it does in the form?

When enabled the “Print Hide” then it will not appear in the print format. there is no way to set the condition. and if you want to set the condition in print format then you have to make a custom print format and set the condition according to the scenario.

@Marshal Please Write Custom Print Format Code if u have add custom condition based show or hide content in print format

Example :

{% if doc.field == 1 %} <h1> My Content </h1> {% endif %}

1 Like