# How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.

-

You will find a lot of tutorials for doing this, take a look here for example : http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

You can use following hooks : show_user_profile, edit_user_profile, personal_options_update, edit_user_profile_update ...

EDIT : But it will not add fields on the "New User" form since there is no hook for that : http://core.trac.wordpress.org/browser/branches/3.3/wp-admin/user-new.php

But you can :

• try to add needed fields using javascript, and use user_register hook to add user meta data in db.
• Or build your own form.
-
I want to add form fields on new user registration form i.e on "add new" page of users section. The link only shows how to add such functionality on "edit-user" and "your profile" page of users section. –  Krishna Apr 19 '12 at 8:35
Sorry, answer updated. –  soju Apr 19 '12 at 8:51
please don't answer just because you have to. read the question properly. –  Hasin Hayder Oct 2 '12 at 3:27
Please don't comment if you don't have any useful information to give. –  soju Oct 2 '12 at 6:41
That's the point of this site, to ask, to answer. Sometimes we make mistakes. That's what down-voting is for, in cases where bad advice/incorrect answers are given, assuming the user doesn't make the effort to correct his/her answer. But without genuine contributions from users this resource doesn't exist. Point in case, if Soju didn't answer this question, it'd still be unanswered. Now who does that help? –  userabuser Oct 29 '12 at 14:41

You can use

apply_filters('show_password_fields', true) )
function youfunction($return) { ?> <tr> <th><label for="gender">Gender</label></th> <td> <label><input type="radio" name="w4p_user_gender" value="male" class="regular-radio" />Male</label> <label style="margin-left:10px"><input type="radio" name="w4p_user_gender" value="female" class="regular-radio" />Female</label><br/> <span class="description">Please select your Gender.</span> </td> </tr> <?php return$return;