I want to put if condition in this drop down

i want to put if condition on non slb template in my html code.

Its like if i select non slb template i dont want to print a particular thing.

Hi @Aditya_Vig,

For print format or field print?
Please, Explain your full scenario.

@NCP i have this code written in html. I dont want that code to be executed if i select non slb template. So how do i write that condition in html?

Hi @Aditya_Vig,

Please check this example.

{% if frappe.db.get_value("Account Opening Form", "DocType name: eg: Acc-001",'account_opening_form_template') == "Non SLB Template" %}

// Set your code here

{% endif %}

{% if frappe.db.get_value("Account Opening Form", "DocType name: eg: Acc-001",'account_opening_form_template') != "Non SLB Template" %}

// Set your code here

{% endif %}

Thanks.

1 Like