Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ayo Adesina 445 posts 1058 karma points
    Feb 10, 2015 @ 15:53
    Ayo Adesina
    0

    Customise Email Work flow - Umbraco 7.2 forms (not contour)

    Hey guys

    Really loving the New Umbraco forms in 7.2, and I have got everything working but I am stuck.

    When a form is submitted I have got a work flow that emails the content of the form, what I want to do is remove one of the fields that gets sent in the email.

    Does any one know how to do this?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 10, 2015 @ 15:57
  • Ayo Adesina 445 posts 1058 karma points
    Feb 10, 2015 @ 16:42
    Ayo Adesina
    0

    I think I have found the answer,

    https://our.umbraco.org/forum/umbraco-pro/contour/18103-Send-xslt-transformed-email-Here-is-my-xslt-email-template

    I need to select the option that says Send xslt transformed email

    I copied the example on the link above

    <xsl:param name="records"/>
    
    <xsl:template match="/">
    <p>  
      Dear  <xsl:value-of select="$records//fields/child::* [caption = 'Gender']//value"/>&#160;<xsl:value-of select="$records//fields/child::*     [caption = 'First Name']//value"/>&#160;<xsl:value-of select="$records//fields/child::* [caption = 'Last Name']//value"/>, thank you for your     application.........
      </p>  
     </xsl:template>
    

    and I changed all the captions to the name of my form feilds.

    I save it as email.xslt and uploaded it to media section.

    1. Is saving it as enmail.xslt correct way of doing it?
    2. Is changing the caption names so for example [caption = 'First Name'] becomes [caption = 'myfeildHere'] - is that the right thing to do?

    At the moment its still sending the email with all the fields in it, any ideas to why?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 10, 2015 @ 18:26
    Dennis Aaen
    0

    Hi Ayo,

    Here is the approach that I think that you should follow to get it to work.

    1. Find this file in your file structure /App_Plugins/UmbracoForms/Xslt/sendXsltEmailSample.xslt
    2. Open up the file and make the changes that you want to it (Don´t rename it after you have make your change, then just replace the new file with the old one). Perhaps it´s a good idea to take a backup before you do it.
    3. Go into the Umbraco Forms section click on the workflow for your form, open up the workflow for the form, and click on the When the form is submitted, it should workflow change the type from send mail to send xslt transformed email. See the screenshot below.

    And you can find the documentation for the working with workflows here: https://our.umbraco.org/documentation/Products/UmbracoForms/Editor/Attaching-Workflows/

    Hope this helps,

    /Dennis

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 10, 2015 @ 19:02
    Dennis Aaen
    0

    Hi Ayo,

    I want to make an update to what I said ealier I can see there have been some new features to Umbraco Forms. You should be able to take a copy of the /App_Plugins/UmbracoForms/Xslt/sendXsltEmailSample.xslt make your changes and upload it to media library. After this change the workflow for the form, to use the from send mail to send xslt transformed email.

    Then pick the XSLT from media library, as you already have did.

    If you don´t know it yet, then the smtp4dev https://smtp4dev.codeplex.com/ is a nice program for testing email sending on localhost I can get it to work, so I also think that you could the same :-)

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft