Checkbox type field should be visible in print view only if ticked

I have created a custom doctype and one field with check field type. When it is ticked, that ticked should be visible in custom print format. How can I achieve this?

Hi @Pooja_Jajal,

It’s a default system rule like

when you ticked the checkbox then it will show in print format but if not ticked then will not show in print format.

Thank You!

Thank you for replying but this functionality is in standard format . I created custom format and its not showing.

Here, i create the custom print format.
Please check it.

If ticked then

If not ticked then

Oh. If possible, can you please share code of this or anything else you have written to display it?

If you use jinja templating then apply the condition.

{{doc.checkbox or ""}}

Please set in your custom print format.
After then reload and check it.

Thank You!

Still there is nothing.

is the checkbox your field name?

If ticked then Gold Foli is printed or not.

Assume like if die_cutting is a checkbox field
then apply it like

{{ doc.die_cutting or ""}}

Hope you understand.

Thank You!

my field name is gold_foil
If I do {{doc.gold_foil or " "}} then its showing 1

if you ticked gold_foil then will show 1 but if do not tick gold_foil then show none.

{{ doc.gold_foil or ""}}

Yes, its showing 1 but want tick

So what do you want?

tickmark just like in standard format

You want if unticked then 0 show.

If not ticked then it should show nothing and if ticked then should show tickmark

Again try it.

Please apply to untick and check.
Your problem will solve.

Yes, I applied tick and untick. Then it’s showing 1 for ticked and none for untick.