how to make auto fill field in wordpress login form using "theme my login" plugin? -
i have created login form using plugin "theme login" in wordpress. make field in login form in if 1 registering new user according provide details of registering user consequent field must auto filled if data match previous created user.
for example : there 2 field in login form first " introducer" , second "introducer id" if new user filled introducer "abcd" , if "abcd" existed in user data "username" consequent fieled i.e. "introducer id" automatically filled existed user id form user data base. if "introducer" text not available in user data error message displays introducer not exists.
you use theme-my-login template in order add code :
- copy wp-content/plugins/theme-my-login/templates/login-form.php in wordpress theme folder root (the plugin check theme path before plugin path).
- add code current_user meta data ( check get_user_meta(); )
check if user has value wp_user_query :
$user_query = new wp_user_query( array( 'meta_key' => 'country', 'meta_value' => 'france' ) );
hope !
Comments
Post a Comment