Events Made Easy › Forums › How do I … › [eme_if tag="#_FIELD{XX}" value='YY'] and email / PDF
Tagged: [/eme_if]
- This topic has 13 replies, 2 voices, and was last updated 2 years, 10 months ago by Franky.
-
AuthorPosts
-
Tue 1 Feb 2022 at 17:58 #63793AnonymousInactive
Hy Franky,
I d’like to send email with PDF attached and make a different mail an PDF depending on the value of a specific FIELD.
Is that possible to use [eme_if tag="#_FIELD{XX}" value='YY'] in mail and pdf? If not is that another way to make diffenrent mail an PDF depending on a special FIELD.Thanks
Cyprien
Tue 1 Feb 2022 at 19:11 #63794FrankyKeymasterBoth the booking mail and the generated pdf support the eme_if shortcode.
Tue 1 Feb 2022 at 20:36 #63795AnonymousInactiveThanks for your answer. Ivtried with this syntax: [eme_if tag="#_FIELD{XX}" value='YY'] but if IS n’ont working. Dos I write something wrong?
I have thé same problem with thé Attendees list. When I try to use #_FIELD{XX} it IS mot working.
IS that because it is some custom FIELD?Tue 1 Feb 2022 at 20:57 #63796FrankyKeymasterIs the “XX” pointing to a valid field? And is that field defined for that booking?
Tue 1 Feb 2022 at 21:13 #63797AnonymousInactiveYes xx is the name of the FIELD ans yes I use this field for that booking.
Cyprien
Tue 1 Feb 2022 at 21:51 #63798FrankyKeymasterAnd how do you use it in the mail (for example)?
Wed 2 Feb 2022 at 07:55 #63800AnonymousInactiveI Franky,
Thanks for your fast answerFor the Attendees list in the parameter:
<li>#_PERSONLASTNAME #_PERSONFIRSTNAME participation au cours: #_FIELD{1} participation ag : #_FIELD{2} participation souper : #_FIELD{3}</li>
For the email with if_tag:
#_FIRSTNAME #_PERSONLASTNAME, [eme_if tag="#_FIELD{1} " value='0'] Votre inscription pour l' #_EVENTNAME a bien été prise en compte. [/eme_if] [eme_if tag="#__FIELD{1} " value='50'] Vous avez réservé avec succès votre place pour la #_EVENTNAME. Les frais de participation au cours d'un montant de #_TOTALPRICE CHF sont à payer au moyen de la facture jointe à cet email sans délai. [/eme_if]
For the #_FIELD I tried with RSVP and GENERIC attribut
Wed 2 Feb 2022 at 09:26 #63801FrankyKeymasterAnd what is the definition of the field #_FIELD{1} ? Or to make sure: does it work in the attendees list as expected?
Also: your tag inside your eme_if example containts a space character, maybe that is your problem?Wed 2 Feb 2022 at 10:20 #63803AnonymousInactiveThe #_FIELD{1} is a RSVP Field and it is working well in the backend attendees list. I tried with GENERIC Field but the problem is the same.
I just tried without the space character but the problem is still present.Wed 2 Feb 2022 at 15:53 #63806FrankyKeymasterI just tested eme_if in email and in the pdf generated: all works as expected.
Wed 2 Feb 2022 at 16:02 #63807AnonymousInactiveOk thanks for your answer. Do’s that possible that it dosn’t work with custom field?
Because I can use it with #_ON_WAITINGLIST but not with custom field.Wed 2 Feb 2022 at 16:04 #63808FrankyKeymasterIt works fine with a custom field, but maybe your value isn’t what you expected. Since you didn’t give your custom field definition, I tested with a custom text-field and the result was visible as expected in the pdf and the mail.
Wed 2 Feb 2022 at 17:55 #63809AnonymousInactiveMy custom field definition is:
Name: participation cours
Type: Dropdown List
Field object: RSVP and I test with Generic too
Req: yes
Sortable: yes
Extra charge: yes
Value: 50 || 0
Tag: oui || nonWed 2 Feb 2022 at 19:30 #63811FrankyKeymasterOk, your values contain spaces too: one character after 50 and one before the 0
You should try without spaces, example (remove the quotes): “50||0”
I’ll try here tooEdit: it works fine, but since your dropdown values are different from your tags, you’d want to test #_FIELDVALUE{xx}
Reason: #_FIELDVALUE{xx} returns the field value, while #_FIELD{xx} returns the tag (the visible text) -
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.