Want to easily create a WordPress Contact Form placeholder? Providing examples of properly formatted answers will help your visitors to easily fill your forms out.
We’ll walk you through each step to add HTML5 placeholder text in your WordPress forms in this post.
What Is HTML5 WordPress Contact Form Placeholder Text?
HTML5 placeholder text is an example of how the form field should be formatted. It shows visitors exactly the type of data that they should enter.
Placeholder text appears within your form fields, but disappears automatically as soon as your users enter their own answers.
Here you can see the placeholder text “John Doe” disappear as soon as the user starts typing:
Why is placeholder text important?
Have you ever been asked for your phone number on a form, filled it in, and had to redo it? Often that frustration results in many ways to submit your phone number. For example, you could write your number in any of these ways…
- 555-5555
- 555 5555
- 555.555.5555
- (555) 555-5555
…and none of those account for country codes!
By providing users with an example of the answer and how it needs to be formatted, you’ll increase the quality of your form results by gathering better data.
Ready to create your own WordPress contact form placeholder text with WPForms? Let’s get started.
Adding HTML5 Placeholder Text
The first thing you need to do is install and activate the WPForms plugin. Here’s a step by step guide on how to install a WordPress plugin.
Also, you’ll need to have a form created. See our tutorial on How to Create a Simple Contact Form as an example to get started.
After you’ve created your fields, it’s time to add your placeholder text.
First, you’ll need to go to the WPForms builder right-hand preview panel. Click on the field that that you want to add placeholder text to.
Then on the left-hand side, expand the Advanced Options sub-menu.
After that, you’ll type your placeholder text as shown below and save your form.
You’ll notice what you type in to the placeholder text input field will display automatically in the right-hand preview panel.
Then preview your published form. It should look something like this:
Styling Your HTML5 Placeholder Text
By default, your WordPress contact form placeholder text will look grey. If you’d like to add some color to your form, you’ll need to add a little bit of CSS code.
You can copy and modify the code provided below to change your placeholder text color to red. You can change red to a color that matches your website.
::-webkit-input-placeholder { color: red; } :-moz-placeholder { /* Firefox 18- */ color: red; } ::-moz-placeholder { /* Firefox 19+ */ color: red; } :-ms-input-placeholder { color: red; }
Next, go to Appearance » Customize » Additional CSS in your WordPress dashboard and paste the code. You’ll see it appear in the Customizer right-hand preview panel. Save your changes and view your published form.
Final Thoughts on a WordPress Contact Form Placeholder
That’s it! You’ve just added HTML5 placeholder text to your form.
Want to customize your form’s style even more? You might also want to check out our guide on how to style contact forms in WordPress.
What are you waiting for? Get started with the most powerful WordPress forms plugin today.
If you like this article, then please follow us on Facebook and Twitter for more free WordPress tutorials.
I added in placeholder text in my plugin which showed up in the preview, but then when I made it live on my website the placeholders aren’t visible. Do you know why they might not show up? Thanks.
Hi Matt,
We’d be happy to take a look! Would you please contact us in support with the URL for the form you’re describing?
Thanks! 🙂
where mails archived?
how can i change message that appears after sending mail
Hi Annette,
I apologize, but I’m not sure that I understand your questions.
In case it helps, here’s our tutorial on changing the confirmation message settings. This is what controls what the user sees after submitting a form.
If that’s not quite what you’re looking for, could you please let us know?
Thanks! 🙂