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.
$args = array(
'echo' => false,
);
$form = wp_login_form( $args );
//add the placeholders
$form = str_replace('name="log"', 'name="log" placeholder="Username"', $form);
$form = str_replace('name="pwd"', 'name="pwd" placeholder="Password"', $form);
echo $form;