Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

clear register form field

$
0
0

Replies: 0

Hello
we add code of making the logged in user can add new user using UM register form
but every time current user open form page he find form field filled with his data
so before you gave me this code to fix this

add_action( 'um_main_register_fields', function(){
   if( is_user_logged_in() ){
     echo "<script type='text/javascript'>";
     echo "jQuery(document).ready(function(){";
     echo "setTimeout( function(){ jQuery('.um-register:not(.um-err)').find(\"input[type=text],input[type=number], textarea\").val(\"\"); }, 600 );";
     echo "});";
     echo "</script>";
   }
});

it was work when I was using the field in registration form (mobile number (as username), email , first name , last name) and all fields appear empty
but
when I add the password field to the form the data of the current user appear but only like the next
in email field the username appeared
and the password appeared as **********
so please advise how to fix
best regards


Viewing all articles
Browse latest Browse all 59525

Trending Articles