Adding fields to the “Add New User” screen in the dashboard

I’d like to add the field “Company Name” to the add new user page in the admin panel. I’ve done quite a bit of searching and have been unable to find details on how to do this. I can easily add info to the profile page and registration with..

   function my_custom_userfields( $contactmethods ) {
    //Adds customer contact details
    $contactmethods['company_name'] = 'Company Name';
    return $contactmethods;

But no dice on anything else.


user_new_form is the hook that can do the magic here.

function custom_user_profile_fields($user){
    <h3>Extra profile information</h3>
    <table class="form-table">
            <th><label for="company">Company Name</label></th>
                <input type="text" class="regular-text" name="company" value="<?php echo esc_attr( get_the_author_meta( 'company', $user->ID ) ); ?>" id="company" /><br />
                <span class="description">Where are you?</span>
add_action( 'show_user_profile', 'custom_user_profile_fields' );
add_action( 'edit_user_profile', 'custom_user_profile_fields' );
add_action( "user_new_form", "custom_user_profile_fields" );

function save_custom_user_profile_fields($user_id){
    # again do this only if you can
        return false;

    # save my custom field
    update_usermeta($user_id, 'company', $_POST['company']);
add_action('user_register', 'save_custom_user_profile_fields');
add_action('profile_update', 'save_custom_user_profile_fields');

For more details visit my blog post:

Leave a Comment