Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Website Setup › Forms › Last name field option
- This topic has 12 replies, 2 voices, and was last updated 6 years, 6 months ago by
Themosaurus.
-
AuthorPosts
-
alexParticipant@abourne
- 81 Topics
- 259 Posts
1. How to make the last name field for the registration form, not just a single field which users are supposed to enter both first and surname into…? I tried adding another text field called ‘last name’ but it does not properly integrate with being displayed.
2. If you enter a demo profile registration, you will find an issue. After user enters name field in registration, then submits, it does not load into their profile. They enter profile then have to re-enter their name. Somehow, the user entry from registration form does not process. User should not need to re-enter their name field again, in profile. Please help to find out why it does not integrate.
October 8, 2018 at 09:06 #2691@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
1) The name field is created by WordPress and BuddyPress to handle the mandatory user name information.
If you wish to create more fields, please go to your dashboard and navigate to “Users > Profile Fields”. There, you will be able to create other fields and field groups to help users save more details to their profiles. For instance, you could add a “First Name” and “Last Name” fields to your “Base” field group to make sure that these fields will be displayed in your register form.
To make things clear for your members, you may be interested in renaming your “Name” field to “User Name”. (Please give a look to the attached screenshots.)2) Can you please attached annotated screenshots to help us understand your issue?
Best regards,
Capture-d’écran-2018-10-08-à-15.32.10
Profile-Fields-‹-Gwangi-—-WordPress
Profile-Fields-‹-Gwangi-Classic-—-WordPress
October 8, 2018 at 15:40 #2712alexParticipant@abourne- 81 Topics
- 259 Posts
The first image is registeration. Then it directs user to members directory to see their profile in the swipe deck. Then if user clicks profile and enters profile, they click ‘edit’ and have option to customise profile fields – the ALREADY entered fields in the user registration flow, are empty… forcing the user to re-enter… this is not right. The fields content is being deleted upon registration.
October 16, 2018 at 20:03 #2908alexParticipant@abourne- 81 Topics
- 259 Posts
Is it optional to remove the base’ profile group fields from the registration flow, so that user only has to enter these fields once they’re inside their ‘already registered’ profile? Therefore, user only enters WP required field, then in profile after registration, can proceed to enter the other fields described in images ‘first name, last, city’.
October 16, 2018 at 20:05 #2909alexParticipant@abourne- 81 Topics
- 259 Posts
Please do this:
1. register: https://www.gymn.com.au/register/
2. you will be redirected to the /edit/group-1
3. you will find that the details entered in step 1 above ‘first name, last name and city’, do not display, causing user to have to re-enter again…This is the dilemma. What is causing the data to not save?
November 1, 2018 at 02:00 #3160alexParticipant@abourne- 81 Topics
- 259 Posts
Moreover, the issue is not just for registration… once user is in ‘/editprofile/’ and ‘saves and continues’ to fill out next group, the data DOES NOT save… when revisting the group which has just been saved, none of the data has been saved. Why is group 1 broken?
November 1, 2018 at 02:08 #3161@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
You’re right, no value has been saved during registration for the “Profile Details” form. When redirected to the
edit/group/1
, all fields are empty. However, after trying to fill the other forms, we’ve noticed that only the first field from each form has been actually saved.This behavior is not experiencing with our demos. So, it’s probably caused some plugin conflicting with BuddyPress.
To go further, could please deactivate all plugins that are not recommended by Gwangi and test again? This might help us to find from where your issue is coming from…
Thank you for keeping us updated.
November 1, 2018 at 18:30 #3199alexParticipant@abourne- 81 Topics
- 259 Posts
FINALLY, found a solution: https://wordpress.org/plugins/bp-disable-activation-reloaded/
Next topic. Reverting to the earlier. Can the first and last name be used above the username, where the cover photo sits. Likewise, on cards in the members directory.
The nature of our site is for proper names to be used, not usernames.
I still struggle to find resolutions via forums as BP keymastersn suggest its in the interest of ‘social mentions/activity’ type functions to remain with unique @ abilities…
November 1, 2018 at 21:39 #3221@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
Glad you managed to solve your problem!
We have a feature request open on this subject:
Replace Username with Name + Verified member is mentioned (name + icon/symbol)
You can join the discussion so that we can better understand the different needs.
Later, we may implement this feature via an option in the WordPress Customizer.regards,
November 2, 2018 at 12:01 #3230alexParticipant@abourne- 81 Topics
- 259 Posts
Can the first and last name be used either:
1. above where the ‘username’ is currently positioned? or
2. instead of the username completelyIdeally the second.
Likewise, on cards in the members directory. Can the first and last name be used and NOT the username?
I tried the following, which did not work:
function force_pretty_displaynames($user_login, $user) { $outcome = trim(get_user_meta($user->ID, 'first_name', true) . " " . get_user_meta($user->ID, 'last_name', true)); if (!empty($outcome) && ($user->data->display_name!=$outcome)) { wp_update_user( array ('ID' => $user->ID, 'display_name' => $outcome)); } } add_action('wp_login','force_pretty_displaynames',10,2);
/** * Format WordPress User's "Display Name" to Full Name on Login * ------------------------------------------------------------------------------ */ add_action( 'wp_login', 'wpse_9326315_format_user_display_name_on_login' ); function wpse_9326315_format_user_display_name_on_login( $username ) { $user = get_user_by( 'login', $username ); $first_name = get_user_meta( $user->ID, 'first_name', true ); $last_name = get_user_meta( $user->ID, 'last_name', true ); $full_name = trim( $first_name . ' ' . $last_name ); if ( ! empty( $full_name ) && ( $user->data->display_name != $full_name ) ) { $userdata = array( 'ID' => $user->ID, 'display_name' => $full_name, ); wp_update_user( $userdata ); } }
I tried this one, which DOES work, but only for the first name and only on member cards, not for the actual profile display. It needs to also include last name and be displayed on member profiles above or instead of username:
//Sets the user's display name (always) to first name last name, when it's avail. add_action ('admin_head','make_display_name_f_name_last_name'); function make_display_name_f_name_last_name(){ $users = get_users(array('fields'=>'all')); foreach($users as $user){ $user = get_userdata($user->ID); $display_name = $user->first_name . " " . $user->last_name; if($display_name!=' ') wp_update_user( array ('ID' => $user->ID, 'display_name' => $display_name) ); else wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) ); if($user->display_name == '') wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) ); } }
I appreciate any solution that can be shared.
November 3, 2018 at 11:03 #3244@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
As mentioned before, another user requested this feature. As you already know, we give a higher priority and our best effort in developing the most wished features.
So please don’t hesitate to provide your feedback and join the conversation in the following topic:
Replace Username with Name + Verified member is mentioned (name + icon/symbol)
We’re looking to implement this in the Customizer and we want to do it in a way that suits the most community members. ?
Cheers,
November 6, 2018 at 11:31 #3330 -
AuthorPosts
The topic ‘Last name field option’ is closed to new replies.