custom field registration facebook

Hi, i have a problem. i need to have a custom field ( telephone ) in registration form. actually i used normal registration and ultimate Fb plugin to allow people to login with FB. add a custom field in normal registration form isn't a problem, but with fb yes. so i used this code and it work, create a custom field but don't save the info that user insert! and don't show it in profile page. there is also other question, that after thanuser insert this info(that custom field required), every time a person do login with facebook don't have to re-insert it....but it have to be yet saved! can u help me? u can see the example here: ....THANKS!

  • gaidesign

    i used both code in teh page...and ithis is my code :

    function eri_add_custom_user_profile_fields( $user ) {
    	<!-- Field Title -->
    	<table class="form-table">
    				<label for="Telephone">
    				<?php _e('Telephone', 'eribootstrap'); ?>
    				<input type="text" name="Telephone" id="Telephone" value="<?php echo esc_attr( get_the_author_meta( 'Telephone', $user->ID ) ); ?>" class="regular-text" /><br />
    				<span class="description"><?php _e('Please enter your telephone.', 'eribootstrap'); ?></span>
    		</tr><!-- field ends here -->
    <?php }
    function eri_save_custom_user_profile_fields( $user_id ) {
    	if ( !current_user_can( 'edit_user', $user_id ) )
    		return FALSE;
    	// Update and Save Field
    	update_usermeta( $user_id, 'Telephone', $_POST['Telephone'] );
    add_action( 'show_user_profile', 'eri_add_custom_user_profile_fields' );
    add_action( 'edit_user_profile', 'eri_add_custom_user_profile_fields' );
    add_action( 'personal_options_update', 'eri_save_custom_user_profile_fields' );
    add_action( 'edit_user_profile_update', 'eri_save_custom_user_profile_fields' );
    function rgkeenan_add_registration_fields ($fields) {
    	$fields[] = array(
    		"name" => "myname",
    		"description" => "Telefono",
    		"type" => "text",
    	return $fields;
    add_filter('wdfb-registration_fields_array', 'rgkeenan_add_registration_fields');
    function rgkeenan_user_registered ($user_id, $registration) {
    	update_user_meta($user_id, 'Telephone', $registration['Telefono']);
    add_action('wdfb-user_registered', 'rgkeenan_user_registered', 10, 2);
  • aristath

    Hello there!
    As we haven't heard back from you we're going to assume the problem was sorted out and mark this thread as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and, as always, for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.