print_designer
print_designer copied to clipboard
feat: Conditional display
It would be great to add the ability to show/hide any element in a print format based on document conditions.
Consider the following example, where I have boxes for various dynamic fields, not all of which will always be populated in a given document:
On the 'Project/PO' rectangle in the shown example, I'd like to choose to only display it if the Customer's Purchase Order
field is set in a given doctype. I believe that the existing frappe.ui.FilterGroup
could provide a good user experience for this, and I suggest adding a checkbox and FilterGroup
in the following arrangement to the settings sidebar:
These selections, of course, would need to be transposed into Jinja if
statements which enclose the conditional elements.
@batonac This is something i am planning to do along with computed fields ( basic arithmetic operation ) but is on medium priority.
it will also be great to support call doc methods or whitelist methods for dynamic text.