Skip to:
Content
Pages
Categories
Search
Top
Bottom

profiles

  • @johnhutchy2014

    Participant

    Hi

    During registration I have selected that first name and last name are required fields, but these are only showing correctly on some profiles after registration, some profiles show that they have a first name some don’t??

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • @wisdmlabs

    Participant

    It is because “required fields” except “Username” accepts blank spaces/tabs. So, in registration process, you should make validations before submitting form.

    @johnhutchy2014

    Participant

    That doesn’t make sense if its a required field, meaning that data must be entered before the form can be submitted then it shouldn’t accept blank spaces?

    And does this mean that I would have to add additional coding to the script for the validation? If so I’m a little lost here too 🙁

    Thanks for your guidance.

    Regards

    @wisdmlabs

    Participant

    Yes, you should make javascript validations for it.
    Other option is not advisable, to make change in plugin’s core file, but if you won’t update buddypress then as in buddypress Version 2.0.2, in file /plugins/buddypress/bp-members/bp-members-screens.php you can make little change on line number 118.

    That is, there is checking for required fields in line number 118, just make it
    empty( trim( $_POST[‘field_’ . $field_id] ) )
    instead of
    empty( $_POST[‘field_’ . $field_id] )

    @johnhutchy2014

    Participant

    hmmmmm I like to keep buddy press up to date 🙁 and my scripting skills are rather poor! I would have thought that there should be some validation already built in, why have the field as required otherwise?

    During registration they enter their account details which consists of a username,email addy, password and confirm password, then they create their profile details on the right of the page, which Ive added fields for first name , last name, gender, DOB etc, and Ive selected that the first name and last name are required fields, so surely if they fail to enter data the form shouldn’t submit??

    or am I missing something here 🙁

    @danbp

    Participant

    About the BuddyPress NAME field.

    @johnhutchy2014

    Participant

    Hi
    “The NAME field in BuddyPress is intended to receive first and last name and replace the two original fields (first name, last name) coming with WordPress.”

    Does this mean that If I remove the first name and last name fields from ‘profile fields’ then that should fix the issue?

    Thanks

    @danbp

    Participant

    If you created additionnally first and last name fields, it’s useless somehow, but i don’t think that it is related to your issue. Or only if you create those fields with an extra function related to the user table.

    You have nothing to loose to remove them and give a try to your profile by using only the default name fields.
    Username | Password | Email| ( wp part)
    NAME (bp part)
    The important thing to know is that the values of this 4 fields are stored in wp_users table.

    Any other profile field values are stored in _bp_xprofile_data table even if you create 20 first name or last name fields on the default showing BASE group.

    What you can do is to give some guidance in the NAME field description, such as: enter here your first name and last name. Alas without any waranty that the user will follow your advice.

    It’s exactly the same problem for the original wordpress “username” field. Some enter Bobby as username and John Doe into the name field (wow! correct !). Others do the opposite and others enter StupidCow in both fields. 😉

    @johnhutchy2014

    Participant

    hmmmm!! Ive deleted the additional fields I added and change first name to full name, I then ran a bogus registration, and its given them a username as it should and then gave them a full name as inserted during the registration process, so fingers crossed it appears to have worked!

    Now my next big dilemma is can I change those have already registered, so that their profiles read correctly ?? is there a way that you know of??

    Thanks

    @danbp

    Participant

    is there a way that you know of?? No, sorry.

    First and last name figuring in display_name col in wp_users table. If you have only a few members do that directly in the DB.

    @johnhutchy2014

    Participant

    Thank you I will look at that, you’ve been a great help thanks..

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘profiles’ is closed to new replies.
Skip to toolbar