I am trying to add placeholder text to the native WordPress registration form. I am currently using the Register Plus Redux plugin.
How to add this placeholder text into the text input fields on the form?
I need to tell people to use their first and last name as the username.
I’d be stoked if someone could help me out.
Another simple way to do this without needing to add another script is using PHP’s str_replace function.
Unfortunately there are no hooks/filters to modify the input field in the login/registration form to add a placeholder to it.
But you can do this by simple jQuery. I am adding the steps below
I am not aware of how this plugin changes the form but you can follow the same for it too.
Below are the codes working for the default login/registration page
First you need to create a js file. I created it in my
active theme's js folder
and named itcustom.js
then added the below line in this file.
The above adds place holder as
User Name
,User Email
andUser Password
to theuser_login
,user_email
, anduser_pass
input field respectively. You can change those as per your requirement.Now you need to add/enqueue this js file which you can do by adding the below code in your active theme’s
functions.php
file