Skip to:
Content
Pages
Categories
Search
Top
Bottom

Easy? Username = Name

  • Avatar of smuddah
    smuddah
    Participant

    @smuddah

    hey everyone,

    i want my “Name” field (which is required by buddypress) to have the same value as the username field.

    sounds easy, but i can’t get it to work.

    i know i can hide the “name” field in css, but how do i get the stuff a user entered in the hidden field? :)

    there might be another way, but i can’t find it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    it might be easier to help if you explained why you are trying to do this?

    Avatar of smuddah
    smuddah
    Participant

    @smuddah

    hey mike,

    sure. because there is no reason for real names in my community. username is enough.

    Avatar of smuddah
    smuddah
    Participant

    @smuddah

    i can’t seem to get this to work.

    anyone might lead me in to the right direction?

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Using the Javascript trick: 1. make sure the Javascript is included in the head, 2. add onkeyup=”copyinput()” to the input tag for the Username, 3. edit the Javascript so that this line…

    document.getElementById('blogname').value = tmp;

    …has the id of the input tag for the Name, instead of blogname. The Javascript would copy the input for username upon typing to name.

    Avatar of daan77
    daan77
    Participant

    @daan77

    You could write a plugin(or rewrite the bp-code) that makes the name field not required and not a Core field and when submitted overtake the username value into that field?

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.