conditional data in email template fails...

freezer 23 Nov, 2010
Hi there,

I'm trying to put some basic php code in my email template, using HTML mode of the editor. Php code:
<?php echo "Hello ChronoWorld" ?>

.. as described in topic:
http://www.chronoengine.com/forums.html?cont=posts&f=5&t=5219&start=0

However when I reload the code in the HTML editor, surprisingly it's converted to:

<!--?php echo "Hello ChronoWorld" ?-->

.. and does not have the effect I want.

Any suggestions?
GreyHead 23 Nov, 2010
Hi Freezer ,

The HTML Mode doesn't support PHP (or some HTML). Instead turn the editor off in the Email Setup Properties box. The resulting plain textarea is not so pretty but will accept PHP.

Alternatively you can use the OnSubmit Before box to build a string that you place in a Post variable and include that in the template with the {var_name} syntax.

Bob

Bob
freezer 24 Nov, 2010
apparently this means that I cannot use rich features anymore? For example <href> links and <strong> tags are ignored...

Any suggestions?
GreyHead 24 Nov, 2010
Hi Freezer,

They both work OK here using the plain textarea.

Bob
This topic is locked and no more replies can be posted.