Jump to:

3395 Posts in 977 Topics by 853 members

Template Questions

SilverStripe Forums » Template Questions » UserForms SS3 Custom E-Mail Template

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 632 Views
  • mimamo
    Avatar
    Community Member
    22 Posts

    UserForms SS3 Custom E-Mail Template Link to this post

    Hi,

    I'm using the awesome UserForms Module, it works perfect but the E-Mail Template looks terrible

    I tried to edit the SubmittedFormEmail.ss but i got some problems.

    1. Even if I delete $Body, the standard html tags were included. ( <!doctype html ... <html><head> ...<body> )
    2. Is there a way to get the created forms by Variable? For example like this: $Field01, $Field02 or <% control Fields.First %>
    <% control Fields.Second %> or something like this.
    3. Have someone a modified, simple, template where i can have a look at?

    thx for your help

    - hobenni

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: UserForms SS3 Custom E-Mail Template Link to this post

    1) The <html> tag is probably included by the SilverStripe mailer internally (https://github.com/silverstripe/sapphire/blob/3.0/email/Mailer.php#L87). Make sure your new email goes into the Email templates folder and you do a ?flush=1

    2) You can use <% control Fields %><% if Pos == 1 %>..<% if Pos == 2.. etc.

  • mimamo
    Avatar
    Community Member
    22 Posts

    Re: UserForms SS3 Custom E-Mail Template Link to this post

    1)can i delete the code out of the mailer.php without messing up with some other functions in ss?

    2)thx i'll do it like this

    632 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.