How to add an HTML code to notification?

  • Profile Image
    Asked on December 05, 2016 at 05: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": "" } </script>


    How do we make this work?


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


    Thank you very much for your assistance.

    Yann Matthew


  • Profile Image
    Answered on December 06, 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. 


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

    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": "" } </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.

  • Profile Image
    Answered on December 06, 2016 at 02: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>

    <!--  -->



    Form in question so you can see:


    Thanks and let me know how we can fix this!



  • Profile Image
    Answered on December 06, 2016 at 04: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.