custom user registration fields, help? (7 posts)

  1. arvinsd
    Posted 9 years ago #

    hi all,

    i've been looking at ways to customize the user-registration process. I want more fields e.g. age, music preferences etc, using radio buttons as well as drop-down menus.

    I think similar questions have been asked before. I searched on these forums and found lots of related chatter but nothing concrete...

    EXCEPT this: http://trac.wordpress.org/ticket/3123

    Somebody looking for the same things as me claimed the above trac solved his problem. MY problem is I'm too dumb to make sense of what that trac ticket thing is...:(

    Can someone please help?

  2. MichaelH
    Posted 9 years ago #

  3. arvinsd
    Posted 9 years ago #

    Thanks for that, but I haven't really gotten anywhere.
    The userextra plugin doesn't do the business - I want to add fields to the registration.

    I think it should be quite simple - anyone? Should I hack wp_login, e.g. add something like

    <label><?php _e('Music Preference:') ?>
    <input type="text" name="user_music" id="user_music" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>

    How can I get drop-downs, checkboxes etc?

    And how can I get these added details to come up on the "users" tab?

  4. arvinsd
    Posted 9 years ago #

    I have this, but can't get it to work.

    from: http://files.viper007bond.com/wordpress/loginformexample.phps

    <?php /*

    Plugin Name: Example Login Form Plugin
    Description: A plugin that shows off some of the new features of the login form.
    Author: Viper007Bond
    Author URI: http://www.viper007bond.com/


    add_action('register_form', 'vipers_exloginform_form');
    add_action('register_post', 'vipers_exloginform_post');

    function vipers_exloginform_form() {
    echo ' <p><label>What is your favorite color?
    <input type="text" name="color" id="color" size="25" class="input" value="' . wp_specialchars(stripslashes($_POST['color']), 1) . '" /></label></p>' . "\n";

    function vipers_exloginform_post() {
    global $errors;

    if ( empty( $_POST['color'] ) ) $errors['color'] = 'ERROR: You need to fill in the color field!';
    else {
    // Do something with the color here, like save it to the database


  5. arvinsd
    Posted 9 years ago #

    last bump - please guys!

  6. Manish
    Posted 9 years ago #

  7. gspark
    Posted 9 years ago #

    on the cimy-user website there is a comment that says that plugin is obsolete

    i wish wordpess made the login and register forms an actual form that can be customized

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.