We recommend that you have some working knowledge of HTML and/or CSS before attempting this. If you do not, please get in touch with our support team who will be able to help. Accessing the HTML of PDF templates The following functions need to be created and edited in the HTML of the PDF template, and so require a certain level of familiarity with HTML. As with all templates, we advise that you save a copy of a template to edit - if for any reason the results are not what you expect, you have your original document to fall back on.
PDF template functions user documentation The PDF template functions can be seen as an extension to the merge variables. They are functions that can be used to control the output based on the content of a merge variable or multiple merge variables. "Dear $contactdetails_contactname" to the pdf template if $contactdetails_contactname contains a value. IFFIELD[$contactdetails_contactname][notempty] With this function you can conditionally include any html or merge variables as well as check multiple variables at the same time. The following example demonstrates multiple merge variables being checked and if all the variables contain a value, a table is displayed: IFFIELD[$contactdetails_contactname&][notempty]
ENDIF A step further would be to nest the functions, which essentially means having a function within a function. IFFIELD[$contactdetails_contactname&][notempty]
ENDIF Troubleshooting The visual editor is liable to include additional formatting which breaks the syntax and as a result the pdf function does not work correctly.
The source shows additional html has been added that breaks the syntax of the function You may also be interested in:
|