What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to add an HTML code to notification?

    Asked by dfinkelstein 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": "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

  • Profile Image
    JotForm Support

    Answered by Rose 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. 

    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.

  • Profile Image

    Answered by dfinkelstein 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>

    <!--  -->

    <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

  • Profile Image
    JotForm Support

    Answered by BJoanna 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.