Written by
Andy Theimer
Posted in Category

How to Create a Blog Subscription Form for Your Company Blog in Pardot

Published on
November 12, 2016

Updated September 2020

Your company's blog—and subsequent blog subscription form—is one of the most important tools for growing your marketing database. It's also a great way to bring visitors back to your website thereby increasing the chance they will inquire about your products or services.

In this week's post, we'll walk through how to create a basic blog subscription form in Pardot and add it to the sidebar of your company blog. For this how-to, you should be a Pardot user and have access to the admin area of your website/blog CMS.  In this example, we will use WordPress as our CMS.

It helps to think of marketing initiatives in terms of "I Want..." phrases. They help to define a purpose and a clear goal that we hope to achieve. For this project our "I Want" phrase is going to be:

"I want to capture the email address of subscribers on the side of my company blog"

When we're all done it will look something like this:

The Sidebar Blog Subscription Form

Here is what the finished product will look like:

blog subscription form

Part 1. Pardot Tasks

If you haven't already, create a new Pardot Campaign & Pardot Folder for this project. We assume the campaign and folder names from that blog post are used.

Task 1: Create a New Layout Template

In order to create a fully-custom blog subscription form in Pardot, we need to create a new layout template to reflect the visual look and feel of our form. Don't worry—I created this for you all you need to do is copy and paste my code into the appropriate places.

  1. In Pardot, navigate to Landing PagesLayout Templates
  2. Click the Add Layout Template button
  3. Name your new template LTMP -Basic Blog Sidebar Form I like to add LTMP to the beginning of my items so I always know that its a layout template.  Adding "Basic" into the name will set you up for a forthcoming how-to on a more advanced form with subscription preferences built-in.
  4. Select your Blog Subscribers folder
  5. Uncheck Include default CSS stylesheet (recommended)
  6. Don't click the button yet, we need to copy & paste in the blog subscriber sidebar form HTML

Now we are ready to add the custom template items.

In the Layout Tab:

  1. Delete everything shown in this box by default
  2. Copy & Paste the following code into the box
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<style>
    #fo-subscribe {
        padding: 0px;
        border: none;
        width: 95%;
        text-align: left;	
        font-family: 'Open Sans', sans-serif;
        color: #868686;
        font-style: normal;
        font-weight: normal;
        line-height: 1.75em;
        font-size: 13px;
    }
    #fo-subscribe>form>h3 {		
        font-style: normal;
        font-weight: 700;
        line-height: 1.5em;
        letter-spacing: 0.01em;
        font-size: 15px !important;
        text-transform: uppercase;
    }
    #fo-subscribe>form>p {
	margin:0px 0px 0px 0px;	
        padding: 0px 0px 0px 0px;	
    }
    #fo-subscribe>form {
        width: 100%; /* 100% if using in a sidebar, 50% if using at the botom of a post */
        margin: 0 auto;
    }
    #fo-subscribe>form>.fo-row {
        text-align: left;
        padding:8px 0;
    }
    #fo-subscribe>form input {
        padding: 12px 15px 12px 15px;
        width:100%;
        -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
        -moz-box-sizing: border-box;    /* Firefox, other Gecko */
        box-sizing: border-box;         /* Opera/IE 8+ */
        background: #F5F5F5 !important;
        margin-bottom: 0;
        font-family: 'Raleway';
        color: #909699;
        border: solid 1px #e5e5e5;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 24px;
        letter-spacing: 0px;	
    }
    #fo-subscribe>form label.error {
        font-size: 12px;
        color: #FD8579;
        display: inline-block;
    }
    #fo-subscribe>form input.error {
        border: solid 1px #FD8579;
    }
    /* Themes:  
    
            fo-light-background-theme: use this if your site has a grey or non-white background
            fo-dark-background-thtme: use this if your site has a white background
    */
    #fo-subscribe.fo-light-background-theme {
        background-color: #FFFFFF;
        padding: 0px;
    }
    .fo-light-background-theme>form>h3 {
        color: #454545 !important;
    }
    .fo-light-background-theme>form>p {
        color: #868686 !important;
    }
    #fo-subscribe.fo-dark-background-theme {
        background-color: #E7E7E7;
        color: #666666 !important;
        border: 1px solid #CCCCCC;
        padding: 10px;
        width: 90%;
    }
    .fo-dark-background-theme>form>h3 {
        color: #025d98 !important;
    }
    .fo-dark-background-theme>form>p {
        color: #666666 !important;
    }
    /* subscribe button color */
    #fo-subscribe input[type="submit"].fo-btn-subscribe {
        background: #2980b9 !important; /* change button background color here */
        color:#FFF;			/* change button text color here */
        margin-bottom:30px;
        border:none;
        font-family: 'Open Sans', sans-serif;	
        cursor: pointer;
        width: 100%;
        font-style: normal;
        font-weight: 800;
        text-transform: uppercase;
        line-height: 22px;
        letter-spacing: 2px;
        font-size:13px;	
        display: inline-block;
    }
    input[type="submit"].fo-btn-subscribe:hover {    
        opacity: 0.8;	
    }
</style>       
</head>
<body style="margin:0px !important;">


    <!-- start content -->

    <div class="fo-light-background-theme" id="fo-subscribe">
       
        
        %%content%%
        
    </div>

    <!-- end content -->
    
    </body>
    </html>

In the Form Tab:

  1. Delete everything shown in this box by default
  2. Copy & Paste the following code into the Form box
  %%form-opening-general-content%%
<form accept-charset="UTF-8" method="post" action="%%form-action-url%%" class="form" id="pardot-form">

%%form-if-thank-you%%
	%%form-javascript-focus%%
	%%form-thank-you-content%%
	%%form-thank-you-code%%
%%form-end-if-thank-you%%

%%form-if-display-form%%

	%%form-before-form-content%%
		
		%%form-start-loop-fields%%
		 <div class="fo-row">
                	%%form-if-field-label%%
                	    <label class="field-label" for="%%form-field-id%%">%%form-field-label%%</label>
                	%%form-end-if-field-label%%
                	
                %%form-field-input%%
                <!--<input type="email" name="email" class="form-control" required="" aria-required="true">-->
                
                
                	
                	<div id="error_for_%%form-field-id%%" style="display:none"></div>
			%%form-field-if-error%%
				<label class="error no-label">%%form-field-error-message%%</label>
			%%form-field-end-if-error%%
                	
            </div> 
		
		%%form-end-loop-fields%%
		
		%%form-spam-trap-field%%
		
		<!-- forces IE5-8 to correctly submit UTF8 content  -->
		<input name="_utf8" type="hidden" value="☃" />
		
		<p class="submit">
		    <input type="submit" accesskey="s" value="%%form-submit-button-text%%" %%form-submit-disabled%% class="fo-btn-subscribe"> 
		</p>
		
	%%form-after-form-content%%
	
%%form-end-if-display-form%%

%%form-javascript-link-target-top%%
</form>

Again, make sure the Include default CSS stylesheet (recommended) checkbox is Unchecked

Click the Create layout template button

Task 2: Create a New Pardot Blog Subscription Form

  1. In Pardot, navigate to MarketingFormsNew Form
  2. Name your form FRM - Basic Blog Sidebar Form
  3. Fill out the remaining fields
  4. Click Next

The following page will allow us to configure:

  • What fields we collect from a blog subscription form (email)
  • The text we show at the top of our form
  • What the visitor sees when they successfully submit
  • Completion Actions that we want to associate

Let's get started!

  • In the Fields section, remove all fields until Email is the only one left.
  • Click Next
  • In the Look and Feel section:
    • Select the Layout Template we just created LTMP - Basic Blog Sidebar Form
    • Enter the Submit Button Text "SUBSCRIBE"
    • Enter the following text in the Above Form box
    • "DON'T MISS A POST" - from the Format dropdown make this phrase Heading 3
    • "Subscribe to receive an email when we publish new content." - from the Format dropdown make this phrase Normal
    • Should look like the image below:
  • Click Next

In the Completion Actions section enter the phrase "Thank You For Subscribing" for the Thank You Content.  This is what will be shown to your visitors after they fill out the form.

I have also created a Completion Action which will add everyone who fills out this form onto a Pardot List called LST - Basic Blog Subscribers. I will use this list as the basis for an email newsletter full of blog posts using FeedOtter.

  • Click Next
  • Review all settings and click the Confirm & Save button

Alright, we're ready to add our new form to our blog.

  • From the Form saved successfully page click the dropdown in the upper-right and select View HTML code
  • Copy the <iframe> code block and get ready to add this to your website.
  • Tip: You may want to change the <iframe> height attribute to 300. That will be more than enough for this form.

Part 2. Embed the Blog Subscription Form on Your Company Blog

I wrote this form to be as flexible as possible but there is no way to predict how it will look 100%. Overall, it should look great with no tweaking.

For this example, we are using WordPress as our blog's CMS (content management system). If you use a different CMS you will need to paste your HTML code wherever you modify your blog's sidebar. This form is specifically designed for a sidebar (right or left) where the width is around 300px so that is where we will put it.

For WordPress Users:

Login to your WordPress Admin and navigate the side menu to AppearanceWidgets. Everyone's Widgets area will look slightly different depending on the Theme you are using but you should be able to identify a Widget that corresponds to the sidebar of your blog. On the FeedOtter blog, it is conveniently named "Blog Widgets."

From the Available Widgets area drag a new Text widget into the sidebar widget area and expand it. This is where you will paste in the HTML content.

Click the Save button and that's it!  At this point, you can head to your blog and see how your blog subscription form turned out.

Troubleshooting

If your blog subscription form doesn't show up, check to see if your website is using HTTPS. If it is, you will need to make a small change to the <iframe> HTML embed code you got from Pardot to make the blog subscription form work.  Go back into WordPressWidgets and edit your iframe code, change http:// to https://.

Other problems or ideas for blog subscription forms in Pardot? Share your suggestions in the comments below!

FeedOtter Can Help You Automate Blog and RSS Email

Promote your content and increase revenue from website traffic.
REQUEST A DEMO