Skip to:
Content
Pages
Categories
Search
Top
Bottom

Which file do I need to edit (registration questions)?


  • birdy47
    Participant

    @birdy47

    Hi everyone :)

    First of all, I am using WordPress MU v2.9.2 and BuddyPress v1.2.3. My question involves the Profile Field Setup within the Admin Dashboard and the editable questions on that page. There is a particular required profile question that I edited directly in one of the files some time ago but I can no longer remember which file it was or it’s location.

    Could someone here please tell me which file(s) I need to edit along with their full path(s)?.

    Thanks so much!, Birdy

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

  • richard1987
    Member

    @richard1987

    Login to your WordPress dashboard and click on BuddyPress on the left hand side. You will see a link called Profile Field Setup. This is where you create and edit your questions.

    Hope that explains what you are looking for :)


    birdy47
    Participant

    @birdy47

    Thanks but I need to know which path/file contains those settings so I can edit it manually. Anyone know?.

    Thanks, Birdy


    r-a-y
    Keymaster

    @r-a-y

    You shouldn’t be editing core files.

    BP has a ton of hooks you can use to get your custom questions on the registration page.

    You could just hook into the following actions and then your custom questions will appear:

    add_action('bp_before_registration_submit_buttons', 'YOUR CUSTOM QUESTIONS');
    add_action('bp_signup_validate', 'YOUR VALIDATION ROUTINE');


    birdy47
    Participant

    @birdy47

    Ok, a few months ago I manually edited a file and simply changed the text “Real Name” to “Verify User Name”. All I want to do now is change it back to what it was originally. I won’t be editing code…just a simple text name but I need to know what path/file I have to edit in order to do this.

    Thanks again, Birdy


    mrjarbenne
    Participant

    @mrjarbenne

    Can you break this down a touch further for the new guy. Do hooks get added to the function.php file in your theme?


    r-a-y
    Keymaster

    @r-a-y

    @birdy43

    Try logging into the WP backend. Navigate to “BuddyPress > General Settings”.

    Under “Full Name Field Name”, change this from the default “Name” to whatever you want.

    @mrjarbenne

    You need to create a custom function for outputting your questions and another one to validate your questions.

    function my_custom_questions() {
    // your questions would go here - would be an input field of some kind

    // eg.
    echo '<label for="my_question">Please enter something for this new field</label>';
    echo '<input type="text" name="my_question" id="my_question" value="" />';
    }
    add_action('bp_before_registration_submit_buttons', 'my_custom_questions');

    function my_custom_validation() {
    // here you'd check the submitted input fields, you'd probably do a check to see if the question is blank, if not return an error message

    // would be something like this:

    global $bp;

    // checking if an input field of "my_question" is blank
    if ( $_POST['my_question'] == "" ) {
    $bp->signup->errors['my_question'] = 'You must type in something for the field "my_question".';
    }
    }
    add_action('bp_signup_validate', 'my_custom_validation');


    mrjarbenne
    Participant

    @mrjarbenne

    Thanks r-a-y, this potentially answers my https://buddypress.org/forums/topic/creating-tos-hurdles forum post. Need to investigate further.


    birdy47
    Participant

    @birdy47

    @Ray

    I swore it was a file I had edited but I guess not. I did what you said and had it fixed in seconds. Perfect. Thanks so much! :)

    – Birdy

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Which file do I need to edit (registration questions)?’ is closed to new replies.
Skip to toolbar