• I’d like to add an additional field for ‘Affiliate’ to my registration form. I’ve already added the First Name and Last Name after looking on your website. I thought I would be able to copy and paste and just change it to ‘Affiliate’ but that isn’t working. My code is below – can you let me know what I’m doing wrong? It would be ideal to include a drop-down menu of different affiliates for the user to choose from. I would also like the email that I receive to approve a user to include this field. Right now it just substitutes that field with the name of the website for some reason…

    <form name=”registerform” id=”registerform<?php $template->the_instance(); ?>” action=”<?php $template->the_action_url( ‘register’ ); ?>” method=”post”>
    <p>
    <label for=”first_name<?php $template->the_instance(); ?>”><?php _e( ‘First Name’, ‘theme-my-login’ ) ?></label>
    <input type=”text” name=”first_name” id=”first_name<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘first_name’ ); ?>” size=”20″ tabindex=”20″ />
    </p>

    <p>
    <label for=”last_name<?php $template->the_instance(); ?>”><?php _e( ‘Last Name’, ‘theme-my-login’ ) ?></label>
    <input type=”text” name=”last_name” id=”last_name<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘last_name’ ); ?>” size=”20″ tabindex=”20″ />
    </p>

    <p>
    <label for=”affiliate<?php $template->the_instance(); ?>”><?php _e( ‘Affiliate’, ‘theme-my-login’ ) ?></label>
    <input type=”text” name=”affiliate” id=”affiliate<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘affiliate’ ); ?>” size=”20″ tabindex=”20″ />
    </p>

    <p>
    <label for=”user_login<?php $template->the_instance(); ?>”><?php _e( ‘Username’ ); ?></label>
    <input type=”text” name=”user_login” id=”user_login<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘user_login’ ); ?>” size=”20″ />
    </p>

    <p>
    <label for=”user_email<?php $template->the_instance(); ?>”><?php _e( ‘E-mail’ ); ?></label>
    <input type=”text” name=”user_email” id=”user_email<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘user_email’ ); ?>” size=”20″ />
    </p>

    <?php do_action( ‘register_form’ ); ?>

    <p id=”reg_passmail<?php $template->the_instance(); ?>”><?php echo apply_filters( ‘tml_register_passmail_template_message’, __( ‘A password will be e-mailed to you.’ ) ); ?></p>

    <p class=”submit”>
    <input type=”submit” name=”wp-submit” id=”wp-submit<?php $template->the_instance(); ?>” value=”<?php esc_attr_e( ‘Register’ ); ?>” />
    <input type=”hidden” name=”redirect_to” value=”<?php $template->the_redirect_url( ‘register’ ); ?>” />
    <input type=”hidden” name=”instance” value=”<?php $template->the_instance(); ?>” />
    <input type=”hidden” name=”action” value=”register” />
    </p>
    </form>

    https://ww.wp.xz.cn/plugins/theme-my-login/

The topic ‘Adding Additional Fields to Registration’ is closed to new replies.