Is there a way to make parts of the response text printed in the mail, conditional to a selected value?
Like
if %value[key] = "Male" print "Mr." else "Mrs."
with PHP?
A use case:
In German, the (formal) salutation's conjugation depends on the addressee's gender.
By making text-snippets conditional to a certain value, I could print the appropriate saluation (a whole sentence) to be followed by the name.
Would appreciate some help / instructions.
Thanks a lot!
Comments
Comment #1
quicksketchThis isn't possible through the user interface, but you can create a template using PHP by following the instructions in THEMING.txt.
Comment #2
Makku01 commentedhow can I do this? how should the php look like?
i have something like this:
but it does not work! in the old version of webform it was no problem there it was like:
any help from your side?
Comment #3
quicksketchI do not provide support for writing custom code in the Webform queue.
Comment #4
quicksketchComment #5
mepperly commentedI realize this is a development thread, but I have been searching for a while and can't figure out a good place to ask this.
Could someone direct me to where to find out how to write this in the UI?
My safe_key|Human Readable is add|Subscribe, I want it to return "add" because of a listserv requirement.
My previous code was: [submission:values:action:nolabel], which was returning the Human Readable "Subscribe" but my mail program requires that we use "add".