Placeholders was introduced with the release of Gravity Forms version 1.9. However, you still had to input one line of code in order to enable the ability to hide the form labels completely.
As of this update, NO CODE IS REQUIRED to enable the ability to hide the form fields. This feature is now available out of the box. BUT if you need the code because you’re running an old version, scroll to the end of this post.
With this feature you can use less space with forms, and make the design look cooler!
What Are Placeholders and Labels
As depicted below, the red circles indicate Placeholders and the green squares are field labels. So placeholders are the text inside the actual filed that disappears when you click in the field to start typing.
How to Add a Placeholder
Adding placeholders is simple, when editing the field go to the “Appearance” tab and the first option is “Placeholders”.
Just populate the field with the text you want to display.
How to Only Use Placeholders?
This WAS the tricky part. In version 1.9.1 they decided to hide the options that allow you to hide the field labels and sub labels.
These are the fields you need to change to hide the form field labels.
When you select “Hidden”, the field label is removed from the the form. You can also hide the Sub-Labels as well, for the fields that support sub-labels.
Below, in the red box, is how the fields will look when using placeholders and hidden fields, compared to the default field display.
Enabling with Code – OLD VERSIONS ONLY
ONLY use this option if you are running an old version of Gravity Forms. But you should really update!
Below is the one line of code you need to add to your functions.php theme file to allow you to hide field labels.
Just copy and past it into your functions.php file on it’s own line. As shown in image below.
That’s it! Add that one string of code and you’ll have the ability to control field labels and take full advantage of Gravity Forms Placeholders!
Have questions, need help…use the comments bellow.