php if condition on pdf template

Hi,

I want to ask if this one is possible. I want to have a if condition inside a pdf template. Here is a sample use case:

User 1 will select from dropdown value from my own module


Dropdown val
value1
value2

then what I want to achieve in pdf template

pdf template val: __x_value1 ____value2

so my condition here is
if($dropdownval == “value1”) echo “x”;

I don’t think you can put the condition into the template, but you might be able to put it into the code that replaces the variables inside the Template.

Exactly where are you editing these templates? Are they Email Templates or the PDF’s you create to use in the “Generate Letter” option?