How to add an HTML code to notification?

  • dfinkelstein
    Asked on December 5, 2016 at 5:50 PM

    Hi there,

    We need to send a small snippet of code with an email - is that possible?

    We use trustpilot as our review service, and they need to be able to pull the information in the email notification from that small snippet of code.

    We need to add this code to the email/form so that TrustPilot can successfully use the information provided:

    <script type="application/json+trustpilot"> { "recipientName": "Name MacNameson", "referenceId": "1234abcd", "recipientEmail": "customer@email.com" } </script>

     

    How do we make this work?

     

    You can see the full link detailing what is needed here:

    https://support.trustpilot.com/hc/en-us/articles/226493667--Upgrading-From-Automatic-Feedback-Service-1-0-to-Automatic-Feedback-Service-2-0

     

    Thank you very much for your assistance.

    Yann Matthew

    InstantCard

  • Rose
    Replied on December 6, 2016 at 12:25 AM

    Thank you for the video includes details explanations. 

    As far as I understood, you would like to insert an html code to your notification alert to allow trustpilot to use your submission information. 

    Please note that you can customise your notification setting as you wish. If you would like to add html code to your notification, you just click the source code on the notification alert and add your code to where you want. 

    How to add an HTML code to notification? Image 1 Screenshot 20

     

    This is the user guide regarding setting up notification. Please kindly have a look at it. 

    https://www.jotform.com/help/25-Setting-Up-Email-Notifications

    You may also need to change field names at following code according to the field names on your form as my understanding.   

    <script type="application/json+trustpilot"> { "recipientName": "Name MacNameson", "referenceId": "1234abcd", "recipientEmail": "customer@email.com" } </script>

    If this is not the case or if you have more questions, please feel free to contact us. We would be pleased to assist you for any issue you may have.

  • dfinkelstein
    Replied on December 6, 2016 at 2:19 PM

    Hi Rose,

    Thanks for your answer -  I did indeed try that before submitting a ticket.  It appears the snippet of code gets automatically deleted from the source code. 

    Here is the exact code I am putting into the source code of the email notification:

    <!-- <script type="application/json+trustpilot">

    {

      "recipientName": "{company}",

      "referenceId": "{invoiceNo}",

      "recipientEmail": "{email30}"

    }

    </script> -->

     

    The email comes through correctly with the right message in the body, but it appears the code itself is removed. 

    Here is what the source code looks like after it gets deleted automatically:

    <p>&nbsp; recipientName: "{company}"</p>

    <p>&nbsp; referenceId: "{invoiceNo}"</p>

    <p>&nbsp; email: "{email30}"</p>

    <!--  -->

    <p>&nbsp;</p>

     

    Form in question so you can see:

    https://form.jotform.com/52936138754161

     

    Thanks and let me know how we can fix this!

     

    Yann

  • BJoanna
    Replied on December 6, 2016 at 4:28 PM

    Unfortunately it is not possible to embed custom Javascript to your form in the Form Builder. It will be stripped off for security reasons, one is due XSS attacks.

    Feel free to contact us if you have any other questions.