Creative Ways to Spice Up Your Pardot Forms: Part 2

In:

The 2nd part of the form customization series is finally here! In part 1, I showed you how to implement the popular floating label technique and how to create searchable, user-friendly dropdowns. In this post, I will show you how to create a conversational, paragraph-style form and how to create a form on a single line.

This is part 2 of the 3 part series. Have you come accross a form recently and didn’t know to replicate the functionality in Pardot? Share it with me via email, a tweet @jennamolby, or in the comments.

Create a paragraph-style form

This “conversational”, paragraph-style form is a unique way to display your Pardot form. It requires editing your layout template and adding some custom javascript and CSS. Here’s a preview of what it looks like.



Edit your layout template

In order for this method to work, you need to make some updates to your layout template. Navigate to your layout template and click on the FORM tab. Replace the code with the code below.

What has changed?
The paragraph tags surrounding the inputs have been replaced with DIVs and the description code has been moved from after the input to before the input.

Edit your form

Since this is an advanced technique, the form setup is a bit unique. The labels within the form will act as the “paragraph text” and the description option will be used as the placeholders within the fields.

Here’s what the set up of my form looks like once the labels are updated and the description text is added.

Add the Javascript

This javascript will take the description text from the form and turn them into placeholder text.

Add the CSS

The CSS is pretty straightforward. Float all the labels and inputs to the left, style the placeholder text and error messages.

Extra customizations

Bump the text to a different line

By default, the form fields will appear on a different line and wrap based on the width of your form. If you want to force a new line, navigate the form field that should start on a new line within the editor. Click on the advanced tab and add the class line-break as shown below.

Add a period to the end of a sentence

You can also add a period at the end of a sentence. Simply, add the class end where you want the period to appear.

The result

Minimal stylying



Styled version



Create a form on a single line

I get a lot of inquiries on how to put form fields and the submit button on a single line. Now I have finally found the time to document it. Here’s an example of what the form will look like.

Edit your layout template

For this method to work, you need to make some updates to your layout template. Navigate to your layout template and click on the FORM tab. Replace the code with the code below.

What has changed?
The paragraph tags surrounding the inputs have been replaced with DIVs.

Add the CSS



The result

Minimal styling with one field



Minimal styling with multiple fields



Styled with one field



Styled with multiple fields



Questions?

Send them to me via email, send me a tweet @jennamolby, or leave a comment.

Related Posts

  • 15/10/2020
    How to Use Flex Fields in Pardot

    Flex fields are custom fields that can be used over and over again to limit the number of one-time-only fields within Pardot and Salesforce. They contain data that is required temporarily to execute a specific event or campaign. Once the data is no longer needed, the fields can be reset to blank using an Engagement Program or Automation Rule

  • 04/10/2020
    How To Embed a Pardot Form on Your Website The Right Way

    Pardot offers 2 methods for embedding forms on your website; embedding using an iframe, and form handlers. While the embedded iFrame forms allow marketers to have control over updating and configuring the forms, using an iFrame isn’t always ideal for website usability. In this tutorial, I will show you how to take advantage of the Pardot iFrame forms and make it look great embedded on your website.

  • 23/09/2020
    7 Ways Pardot Users Can Use Chrome Developer Tools For Troubleshooting & Testing

    Chrome Developer Tools is widely used by developers to help edit pages on-the-fly and diagnose issues. Pardot users can use DevTools to troubleshoot and test landing pages and forms. In this post, I’ll show you 7 ways you can use DevTools, including how to identify errors on a landing page, how to customize the CSS of a form and how to view hidden form field values.

2 comment(s)
  • Caitlin

    06/02/2020 at 1:44 pm
    Reply

    Such a great resource, thank you! Currently using your suggested code for a form on a single line styled with multiple fields, but am stuck on something. I can't get the "submit" button to move to its own line on mobile. The rest of the fields stack, but the button remains to the right of the last field, rather than breaking onto the next line. Any ideas? Thanks so much.

    • Jenna Molby
      to Caitlin

      14/02/2020 at 9:39 am
      Reply

      Hi Caitlin, Adding this CSS to your form should bump the submit button to another line on mobile devices @media only screen and (max-width : 680px) { form.form p.submit { clear:both !important; } } Cheers, Jenna

Leave A Comment

Your email address will not be published. Required fields are marked *

About Me


Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a Marketing Operations leader.

Categories
Most Commented
Popular Posts