GDPR and CASL compliance are just a few reasons to add an explicit opt-in message or a privacy policy to your Pardot forms. In this post, I’ll show you how to add a custom opt-in message to your form and a privacy consent message above the form submit button.
Adding an opt-in checkbox
Add your opt-in field to your form and remove the label text.
Navigate to the values tab and input the values for the checkbox. The first box contains the value that will be stored in the Pardot database (in my form the stored value is yes). The second box contains the value that will be displayed to the prospect completing the form. In this case, it’s the opt-in message.
Save and preview your opt-in message. Here’s what mine looks like.
Add links and other formatting
You can add HTML to your opt-in message to include links, bold text, etc, by adding it directly as the display value.
1 |
Yes, I would like to receive emails from <a href="https://jennamolby.com"><b>Jenna Molby</b></a> with exclusive updates on product news, invitations to events and webinars and resource alerts. <i>I may unsubscribe at any time</i>. |
When you preview the message within the editor, it will show the HTML tags, but when you view the live form, it will display the correct HTML.
Adding a privacy policy message
Before the submit button
You can add a privacy policy above the submit button by adding javascript to your form.
Custom JavaScript can be placed within your Pardot forms under Look and Feel > Below Form. Click on the HTML button within the WYSIWYG editor and add in the JavaScript.
Edit the javascript below to include your privacy policy message.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<script type="text/javascript"> function insertBefore(el, referenceNode) { referenceNode.parentNode.insertBefore(el, referenceNode); } var newEl = document.createElement('div'); // replace this line with your message newEl.innerHTML = '<span id="privacy-policy-msg">By registering I confirm that I have read and agree to the <a href="https://jennamolby.com/privacy-policy/" target="_blank">Privacy Statement</a>.</span>'; var ref = document.querySelector('p.submit'); insertBefore(newEl, ref); </script> |
Here’s what my form looks like once the privacy poilcy message has been added.

Some CSS can be added to the form to style the privacy policy message.
1 2 3 4 5 6 7 8 9 10 |
<style type="text/css"> #privacy-policy-msg { font-size:11px; line-height:20px; font-family: 'Open Sans', sans-serif; margin-bottom:10px; display:inline-block; text-align:center; } </style> |
As a consent checkbox
You might require prospects to “check” a privacy consent checkbox in order to submit the form. This can be added the same way the opt-in checkbox was configured above.
Questions?
Send me a tweet @jennamolby, leave a comment below, or book a Peer Chat.
Jenna,
I’d like to show an opt-in checkbox to users from particular countries that require it, but only a privacy message (with no checkbox) to users from other countries that don’t require it. Within Pardot, it’s easy to configure the opt-in checkbox to only show when certain values (i.e. countries) are selected, but is there a way to modify the privacy message script you provided, so that the message only shows when particular values are selected in my “Country” field?
Hi Doug, That’s possible if you add some additional javascript. The javascript would check to see what the country value is in the dropdown and display the privacy policy message accordingly.
Hi! I’m having real trouble with the javascript necessary to allow the message only when certain countries are selected in the country field. Could you help with that please?
Hi Jenna,
Are you able to do this with a Form Handler?
I’ve searched high and low but can’t find a way as the handler options data format are only “text”, “number”, or “email”. Any advice to make sure we have an official opt in? We’ve already invested in an agency to build out the new website using WordPress and Gravity forms.
Hi Peyton, Yes, you are able to do this with a form handler. You would set the field to TEXT within the form handler and then pass the value “true” or “false” to Pardot.
Thanks Jenna! If you have any previous “opt outs” will you have to manually opt them back in or can this be done with an automation rule for any prospect that fills out a form again and will re-subscribe them?
Hi Catherine,
I usually keep the opt-in separate from the opt-out. Meaning, if someone unsubscribes from an email then fills out a form and selects the “opt-in” checkbox, I still honour the unsubscribe. You could use an automation rule if you want to opt them back in or you can enable the Prospect Resubscribe functionality instead: https://help.salesforce.com/articleView?id=pardot_prospect_resubscribe.htm&type=5.
Hi Jenna, super helpful article! Can you clarify one thing, when a person checks the box to subscribe to your mailing list, is that mapping to a prospect field or is it a trigger to add the person to a segmentaton list? If the latter, how is that done? Thanks!
Hi Meghan, Thank you! I usually map it to a prospect field and then use that in a dynamic list, but you could do it either way. You could also use an Automation Rule to add the prospect to a segmentation list if the “opt-in” checkbox = TRUE.
Hi Jenna, great article!
If someone is opted in previously, they fill out the form and then they don’t tick the box, the ‘opt in’ field is then overwritten to be blank, do you know how to solve this?
Chris
Hi Chris, Thank you! What I’ve done to solve this issue in the past, is create a field called “form consent” or something similar and use that within the form to check for an opt-in. Then, I used an automation rule to “check” the real opt-in field only if the opt-in field is empty. That way the “form consent” checkbox will be updated whenever a form is submitted, but the real opt-in field will only be “checked” once.
Jenna,
If you create a checkbox with only one value (e.g. “Yes” if checked), then won’t the value be null if it’s not checked? And therefore, if the box has been checked on a form, won’t it be hidden on subsequent forms (unless you’ve configured it to “Always display even if previously completed”)?
Hi Doug, Yes, that’s correct.