Getting Started

Learn through 101 guides and easy solutions.

Creative Ways to Spice Up Your Pardot Forms: Part 1

Creative Ways to Spice Up Your Pardot Forms: Part 1

min. reading

Looking for some creative ways to spice up your Pardot forms? In this post, I will show you how to implement the popular floating label technique in three easy steps. I will also show you how to turn your long drop down menus into user-friendly, searchable dropdowns.

This is part 1 of the 3 part series. Check out part 2 here.

1. Floating labels

You have probably seen this technique before. The label appears as placeholder text and when you click on the field the text moves out of the way and allows you to type. This technique can be applied to your Pardot forms in three steps.

Here’s an example of what it looks like. Click on the field to see the effect.

Adding this effect to your Pardot forms

Step 1: Edit your layout template

In order for this to work the labels within your forms must be placed below the fields. By default, the labels are above the form fields. To modify this, you will need to edit the layout template, click on the form tab and replace everything within the editor with the code below.

<form accept-charset="UTF-8" method="post" action="%%form-action-url%%" class="form" id="pardot-form">



			<p class="errors">Please correct the errors below:</p>
			<div class="form-field %%form-field-css-classes%% %%form-field-class-type%% %%form-field-class-required%% %%form-field-class-hidden%% %%form-field-class-no-label%% %%form-field-class-error%% %%form-field-dependency-css%%">
				<label for="%%form-field-id%%">%%form-field-label%%</label>
					<span class="description">%%form-field-description%%</span>
				<div id="error_for_%%form-field-id%%" style="display:none"></div>
				<p class="error no-label">%%form-field-error-message%%</p>
		<!-- forces IE5-8 to correctly submit UTF8 content  -->
		<input name="_utf8" type="hidden" value="&#9731;" />
		<p class="submit">
			<input type="submit" accesskey="s" value="%%form-submit-button-text%%" %%form-submit-disabled%%/>


Step 2: Add the CSS

Add the CSS below to your layout template. This will create the effect of the floating labels for all form field other than radio buttons and checkboxes.

<style type="text/css">
 /* The below styles are required for the floating labels */
.form-field {
  text-align: left;
  position: relative;
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea,
.form-field button,
.form-field select {
  padding: 12px;
  font-size: 14px;
  border: 1px solid #c6c6c6;
  width: 100% !important;
  color: #888;
  font-size: 16px;
  font-weight: 300;
  background-color: #fff;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  -moz-transition: all 0.3s;
  -o-transition: all 0.3s;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
.form-field input[type="text"]:focus, 
.form-field input[type="text"]:hover,
.form-field input[type="email"]:focus,
.form-field input[type="email"]:hover,
.form-field input[type="tel"]:focus,
.form-field input[type="tel"]:hover,
.form-field textarea:focus,
.form-field textarea:hover,
.form-field button:focus,
.form-field button:hover,
.form-field select:focus,
.form-field select:hover {
  outline: none;
  border-color: #9FB1C1;
.form-field input[type="text"]:focus + label, 
.form-field input[type="text"]:hover + label,
.form-field input[type="email"]:focus + label,
.form-field input[type="email"]:hover + label,
.form-field input[type="tel"]:focus + label,
.form-field input[type="tel"]:hover + label,
.form-field textarea:focus + label,
.form-field textarea:hover + label,
.form-field button:focus + label,
.form-field button:hover + label,
.form-field select:focus + label,
.form-field select:hover + label {
  color: #077ABC;
  cursor: text;
.pd-text label, .pd-select label, .pd-textarea label {
  position: absolute;
  left: 8px;
  top: 12px;
  color: #999;
  font-size: 16px;
  display: inline-block;
  padding: 4px 10px;
  font-weight: 400;
  background-color: rgba(255, 255, 255, 0);
  pointer-events: none;
  -moz-transition: color 0.3s, top 0.3s, background-color 0.8s;
  -o-transition: color 0.3s, top 0.3s, background-color 0.8s;
  -webkit-transition: color 0.3s, top 0.3s, background-color 0.8s;
  transition: color 0.3s, top 0.3s, background-color 0.8s;
.pd-textarea {
  top: -11px;
  color: #555;
  background-color: white;
.form-field textarea {
  resize: none;
  height: 200px;
form.form select {
    -webkit-appearance: none; 
   -moz-appearance: none;
   appearance: none; 
/* Style the Pardot error messages */
form.form div.error {
    padding:0 !important;
form.form, form.form {
    margin:0 !important;
#pardot-form {
  margin:0 auto;

Step 3: Add the Javascript

In addition to the CSS, this method uses some Javascript. Place the code below within your layout template as well.

<script src=""></script>
$('input[type=text], select, textarea').addClass('floatLabel');
	function floatLabel(inputType){
			var $this = $(this);
			// on focus add classs active to label
			//on blur check field and remove class if needed
				if($this.val() === '' || $this.val() === 'blank'){
			//manage the pre-populated values
			if($this.val() != '' ){

The result

Here’s what the floating labels look like after implementing all the code within the layout template.

2. Searchable dropdowns

I came across this technique when I was registering for a webinar recently. When I went to select my Country from the drop-down, I was greeted with a search feature for the drop-down. I immediately started Googling what JavaScript plugin they were using to see if I could use it on Pardot forms. It turns out, you can and not only is it super easy to implement, but it also makes long drop-down in your Pardot forms more user-friendly.


Here is what a searchable drop down looks like in action.



Adding this effect to your Pardot forms

Navigate to your form and click edit form. Go to step 3: Look and Feel, click on the below form tab, click on the HTML icon and paste this code:

<!-- load the chosen.js stylesheet -->
<link href="" rel="stylesheet" />
<!-- load the jquery library -->
<script src=""></script>
<!-- load the chosen.js library -->
<script src="">
<!-- apply the chosen.js library to the country drop down -->
  $(".country select").chosen({no_results_text: "Oops, nothing found!"}); 

Update country with the name of your drop down field. Optionally, you can update the no_results_text to what ever you want to display when the no results are found for the searched term.


Send me a tweet @jennamolby, or contact the Sercante team for help.

Subscribe to The Spot

This field is for validation purposes and should be left unchanged.

Salesforce Training Courses


Top 5 Recent Posts

  • Jenna is a Marketing Operations leader with over 10 years of experience working with both enterprise organizations and start-ups. She started her career as a consultant, helping B2B and B2C clients get the most out of Marketo, Pardot, Marketing Cloud and Salesforce. She then moved in-house, working with B2B SaaS companies, helping them build their sales and marketing technology stacks and processes from scratch.

Leave Your Comment

Related Articles

Bot Single Post