Hi,
my users are regularly confused because they have to enter a name twice during registration. the difference between username and display name is difficult to convey to normal users.
so i was looking for a way to simplify buddypress registration and found the guide here:
should the code from the guide still work?
hiding the fields with css works perfectly. however, the registration cannot be completed (click on “complete registration” does nothing).
Hey There Psycho,
I Think that Should Work Perfectly Even Now.Go Ahead And Give it A Try 🙂
Cheers, Cromacioa copy of my private answer (no idea why I checked the private box …)
***
Link to the registration form: https://staging-psycholol.kinsta.cloud/registrieren/Additional CSS
form div.field_1 { display:none !important; } #buddypress .standard-form label[for="signup_password_confirm"], .register-section #signup_password_confirm { display:none !important; }
added to BuddyX Version: 4.2.4 function.php
function buddydev_inject_username_as_fullname() { $_POST['field_1'] = $_POST['signup_username']; // disable confirm password. $_POST['signup_password_confirm'] = isset( $_POST['signup_password'] ) ? $_POST['signup_password'] : ''; }
- This reply was modified 2 years, 10 months ago by
Psycho.
- This reply was modified 2 years, 10 months ago by
Hi Psycho,
You Added the Function, but You Forgot to Call the Function
Add This-add_action( 'bp_signup_pre_validate', 'buddydev_inject_username_as_fullname' );
Also, I Think The Step 3 Mentioned Here- https://buddydev.com/buddypress-better-registration-part-1-remove-full-name-confirm-password-from-buddypress-registration/ could be Added too.
function buddydev_disable_fullname_required_attributes( $atts, $field_name ) { global $field; $fullname_field_id = 1; if ( $field && $fullname_field_id !== $field->id ) { return $atts; } foreach ( $atts as $key => $value ) { if ( 'required' === $value ) { unset( $atts[ $key ] ); break; } } return $atts; } add_filter( 'bp_get_form_field_attributes', 'buddydev_disable_fullname_required_attributes', 10, 2 );
Hope That Helps.. 🙂
CromacioHi Cromacio,
Thank you for the assistance here.Regards
Brajesh
You must be logged in to reply to this topic.