Hi,
I am using a show/hide Javascript to show or hide a group of elements based on a checkbox.
It would be nice if I could also hide these elements from the email template.
Is it possible to use if/else conditions in email templates?
Hi moleculezz,
Yes it is.
Bob
Nice try, but that's not what I'm looking for😉
Yes, example:
<?php if($form->data["checkbox"] == "X"): ?>
Your conditional html code in email
<?php endif; ?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Moleculezz,
As well as Max's suggestion* you can:
+ Use include statements to add completely different templates or parts of templates
+ Use Custom Code actions to build different parts of templates
+ Use the Event Switcher actions to select different Emails to send.
It does all depend on exactly what you need to do.
Bob
* If you use PHP in the Email template you **must** keep the Rich Text Editor turned off.