Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can I add one or more extra fields to the registration form in bbpress 2.0.2?

I want to add a textarea where prospective users can write their reason for joining the forum.

share|improve this question
    
any help on this? maybe someone has worked with bbPress, its a bit frustrating how little support there is at the mom. –  drtanz Feb 14 '12 at 15:45
add comment

2 Answers

This is completely untested as I don't use bbPress or have a copy on hand to try out for myself, but this page seems to have some code that allows you to add new registration fields.

<?php
/*
Plugin Name: Customize User Profile
*/

add_filter( 'get_profile_info_keys', 'customize_user_profile', 10, 2 );

function customize_user_profile( $fields, $context ) {
    /**
     * Remove undesired fields
     *
     * Commented =   left
     * Uncommented = removed
     */
//  unset( $fields['first_name'] );
//  unset( $fields['last_name'] );
    unset( $fields['user_url'] );
//  unset( $fields['from'] );
    unset( $fields['occ'] );
    unset( $fields['interest'] );

    /**
     * Add new fields
     *
     * Quoting functions.bb-core.php, line 906:
     * meta_key < (required?, Label, hCard property).  Don't use user_{anything} as the name of your meta_key.
     */
    $fields['my_meta_key'] = array(
        false,
        __( 'My meta key' ),
        'text'
    );

    return $fields;
}

Note: Edit is a copy/paste from the linked source.

share|improve this answer
    
Didn't work for me but I found the solution using this plugin:wordpress.org/extend/plugins/cimy-user-extra-fields/… –  drtanz Mar 26 '12 at 11:20
add comment
up vote 0 down vote accepted

Turns out that the WordPress login and bbPress logins are the same. So you can just find code to tweak the WordPress registration form, or indeed use a plugin, which is very simple:http://wordpress.org/extend/plugins/cimy-user-extra-fields/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.