How to Add Placeholder Text Within Pardot Forms

In:

There’s currently no feature for Pardot forms that allow you to use placeholder text instead of the label text. So, in this tutorial, I will show you how to add a bit of JavaScript to your Pardot forms to use the field labels as placeholders.

Step 1: Add the JavaScript

Navigate to Marketing > Forms > Layout Templates and select the layout you want to add the placeholder text to. Paste this Javascript at the bottom of the form tab and save.

Step 2: Add the CSS

If you want to use placeholder text instead of the form field labels, you will need to add some CSS that will hide the labels on the form.

Navigate to Marketing > Forms > Layout Templates and select the layout you added the JavaScript to. Paste this CSS at the top of the form tab and save.



Questions?

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

Related Posts

  • 26/05/2020
    How to Setup Lead to Account Matching in Salesforce Using Process Builder and Flow

    Establishing a connection between leads and accounts can give you insight into what customers are coming in as leads and tighten sales and marketing alignment. Salesforce Flow and Process builder can be used to automatically match leads to existing accounts based on different criteria. In this post, I’ll show you how to match leads to accounts based on domain a well as company/account name.

  • 19/05/2020
    6 Ways to Manage Lead Assignment in Pardot and How to Determine The Best Option

    There are many different ways to assign your prospects within Pardot. You can manually assign prospects or utilize automation rules or completion actions to assign prospects based on their activity or information. In this post, I’ll dive into 6 different ways to manage lead assignment in Pardot and how to determine what the best option is for you.

  • 12/05/2020
    How I Manage Lead Assignment in Salesforce For a Global Sales Development Team

    Part of my role as a Marketing Operations Manager is to manage the lead assignment process within Salesforce for our team of 25+ Sales Development Representatives from around the world. A crucial piece to our success is getting the leads to the right person without any delay and ensure a smooth handoff from marketing to sales. In this post, I will walk you through exactly how I manage the lead assignment and lead reassignment process within Salesforce and share some lessons learned along the way.

50 comment(s)
  • Nick Mexal

    10/08/2017 at 7:28 am
    Reply

    Hi Jenna, first off, this is amazing. I'm new to Pardot and this sort of thing is just not my cup of tea. Your blog has been a huge help. Question for you on this solution. Is there a way to customize the font color on the labels? I'm using a transparent field background on a dark-ish browser fill so I'll like to have the text be white rather than gray (it also matches our website design that way). Is this doable? Or did I miss something obvious? Thanks a million!

    • Jenna Molby
      to Nick Mexal

      10/08/2017 at 9:23 am
      Reply

      Hi Nick, So happy you found it helpful. Are you looking to change the font color for the placeholder text. If so, you can do this using CSS. Here's a good article explaining how to do it: https://css-tricks.com/almanac/selectors/p/placeholder/. Cheers, Jenna

  • Troy Meyer

    07/08/2017 at 2:14 pm
    Reply

    Thank you for the quick and helpful tip! Saved me from having to start from scratch and worked perfectly, allowing me to integrate my client's overall website style into the Pardot forms.

  • Maeva TraorĂ©

    17/07/2017 at 9:11 am
    Reply

    Hello Jenna, I managed to add placeholder text within my Pardot form. The problem appears when I add it to my landing page. I don't have the placeholders anymore. Do you know how to fix that? Many thanks,

  • Katy

    17/04/2017 at 12:29 pm
    Reply

    Jenna, I thought I'd add that the jquery link needs to be added and this modified version works best for me: var labels = document.querySelectorAll("p.pd-text label, p.pd-select label, p.pd-textarea label"); var i = labels.length; while (i--) { var label = labels.item(i); var text = label.textContent; label.parentNode.classList.contains("required") && (text += " *"); var nextElement = label.nextElementSibling; if(nextElement){ if (nextElement.tagName == 'SELECT') { nextElement.options[0].text = text; } else { nextElement.setAttribute("placeholder", text); } label.parentNode.removeChild(label); } } var elements = document.querySelectorAll('.errors, .no-label'); Array.prototype.forEach.call(elements, function(el, i) { el.parentNode.removeChild(el); });

  • Anna

    15/02/2017 at 5:55 am
    Reply

    Hi Jenna, Thank you for this! I tried it but couldn't get it to work on drop down menus. Do I need to add anything extra?

    • Jenna Molby
      to Anna

      15/02/2017 at 11:37 am
      Reply

      Hi Anna, Placeholders don't work for dropdowns. Instead, you need to create a default value for the first value of the dropdown.

    • Jean M
      to Jenna Molby

      16/02/2017 at 7:40 am
      Reply

      Hi Jenna, how would you create a default value for the dropdown?

    • Jenna Molby
      to Jean M

      16/02/2017 at 9:27 am
      Reply

      Hi Jean, This is a bit more complicated since I don't think there's a way to add a default option in Pardot forms. Feel free to email me at [email protected] with a link to your form and I can show you how it's done using some Javascript. Thanks!

    • Terry Rourke
      to Jenna Molby

      11/05/2017 at 12:46 pm
      Reply

      I was able to add a label using the first "blank" value. Edit the form field, on "Values" tab click on the "A" next to the top blank value to show the label, place the field name here and save. Now the blank value at the top will have the value of the field name and be shown.

    • Rhonda Hernandez
      to Jenna Molby

      18/09/2018 at 1:37 pm
      Reply

      I have everything working great except my dropdowns are not populating with the label. Is there some javascript code you could give me to make this work. Thanks alot.....

1 2 3 7

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