Bill Fetter

Jul 10, 2020

How to keep the Pardot comments field tidy

The comments field in Pardot allows multiple submissions to accumulate, which is great if you have customers that have a tendency to keep filling out forms on your site.

The issue with this is that while Pardot helpfully puts a date stamp after each submission, when this field is synched with Salesforce, the comments all run together and become quite unreadable.

However, if you're using form handlers to pass form data to Pardot, there's a way to pass some hidden code to help things look a lot more tidy. Just remember %0A. This is the carriage return code in a URL and it will automatically make your Salesforce Pardot comments look a lot better!

This works great when you are passing a URL string to the Pardot form handler, as you can just insert a %0A wherever you want a line break to occur. So for example if you wanted to make sure your comments field appeared on a new line in the Pardot commends field in salesforce, the url string would look something like:

&comments=%0A{comment_from_external_form}%0A

This creates a line break before and after your comments. It doesn't make any impact in Pardot, but it looks a lot better in Salesforce!

Another trick that you can use with a form handler is to submit to the comments field more than once, and add additional commentary that's outside of your field value, as long as you are encoding any additional characters such as spaces with their unicode equivalents, space=%20 comma=%2C and so forth.

So for example, you could double-submit to the comment field in the form handler additional information from another separate form field to add a second piece of information in the comments field on the same submission:

&comments=%0ASome%20other%20piece%20of%20info%3a{the_answer_from_the_form}%0A

A great application for this is to allow you to record fields with transient meaning as comments and not have to include them as part of the Pardot custom field set, since the meaning is only relevant to that particular form submission at that moment in time. Examples of this might be "do you want the chicken or fish" or "do you want us to call you back immediately".

    1373
    1