Snippets

Use Snippets in RSForms reply

1 month 2 weeks ago #95375

Thomas Thrane's Avatar Thomas Thrane

Hi

I'm trying to use a snippet in the mail sent to admins, but I can't get it to work.
Any ideas?

This is what I use in the admin email:

Side: {URL:value}
{Navn:caption}: {Navn:value}
{Email:caption}: {Email:value}
{Besked:caption}: {Besked:value}
{Samtykke:value}

{snippet samtykke}

Kind regards
Thomas

1 month 2 weeks ago #95376

Peter van Westen's Avatar Peter van Westen Admin

Emails - depending on the component that sends them - are generally not passed through the plugins before sending. Meaning you can't use any plugins in the email text.

1 month 2 weeks ago #95381

Thomas Thrane's Avatar Thomas Thrane

Good to know, thanks!

1 month 2 weeks ago #95382

Peter van Westen's Avatar Peter van Westen Admin

You might want to ask the RSForms developers if they have as solution for you.

1 month 2 weeks ago #95383

Thomas Thrane's Avatar Thomas Thrane

I will, thanks, Peter!

1 month 2 weeks ago #95385

Thomas Thrane's Avatar Thomas Thrane

Just to let you know, they had a solution:

You can include the following line added within the "Script called before the Admin Email is sent" area (while editing a form > Form Properties > PHP Email Scripts) which will trigger such plugins:

$adminEmail = JHtml::_('content.prepare', $adminEmail);

1 month 2 weeks ago #95386

Peter van Westen's Avatar Peter van Westen Admin

Ok, great!