Forums

E-mail action: Add text based on the value of a specific field

jj135 28 Jul, 2017
Hi!

I was wondering if it would be possible to add text to an email based on the value of a field?

For instance when someone selected to subscribe to the newsletter we would like to add some text to the email like 'Thanks for your subscription to our newsletter. Don't forget to activate your subscription with the link in the activation e-mail you received'.

But this text should only appear in the mail when the value of {data:nieuwsbrief} is 'Ja'.

Is this possible?

Kind regards,
Jip
Max_admin 29 Jul, 2017
Answer
1 Likes
Hi Jip,

Yes, again with a Switch action:

Add {data:fieldname} in the data provider and set the value setup as:
Ja:text goes here


then use {var:switch_name} in the email body

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 30 Jul, 2017
1 Likes
Ah, the switch again ;-) Sounds like the way to go. Thanks.
This topic is locked and no more replies can be posted.