Harounkola's website. The registration options

Hello there. I noticed on http://harounkola.com/join/?action=registeruser&subscription=12 that you can fill in custom questions, such as "Why do you want to join".

I need to add some fields, such as adding a telephone number, and business title. Can you show me how?

Thanks!

  • aecnu
    • WP Unicorn

    Greetings Ashley,

    Rob is right on the money on this one again that it was a manual edit by Haroun in which he did himself so there is not a post to point you to that I am aware of where he received assistance from us doing it.

    However, if Rob does not figure it out I will see about getting a coder in on the action to offer us the solution.

    Thank you both for being WPMU Dev Members!

    Cheers, Joe

  • digitsoft
    • The Crimson Coder

    Ok...an hour and a half...and I was looking for something that was membership related and eventually reverted back to regular wp stuff. Here's how to save it to the usermeta table:
    1. Add this to registration.form.php line 49:
    <div class="form-element">
    <label class="control-label" for="my_test"><?php _e('My Test','membership'); ?></label>
    <div class="element">
    <input type="text" class="input-xlarge" id="my_test" name="my_test" placeholder="" value="<?php echo esc_attr($_POST['my_test']); ?>">
    </div>
    </div>

    2. Add this to /wp-content/plugins/membership/membershipincludes/classes/membershippublic.php line 1343:
    update_usermeta( $user_id, 'my_test', $_POST['my_test'] );

    3. Add this to /wp-admin/user-edit.php line 331 (to display it):
    <tr>
    <th><label for="my_test"><?php _e('My Test'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
    <td><input type="text" name="my_test" id="my_test" value="<?php echo esc_attr( get_the_author_meta( 'my_test', $user->ID ) ); ?>" class="regular-text" /></td>
    </tr>

    That's it...no guarantees...originally didn't have save in here, but added it in a post below.

    NOTE - I also updated line 1307 of membershippublic.php, but not sure it's needed:
    $result = array('user_name' => $_POST['user_login'], 'orig_username' => $_POST['user_login'], 'user_email' => $_POST['user_email'], 'user_email' => $_POST['my_test'], 'errors' => $error);

  • digitsoft
    • The Crimson Coder

    How to let the user save changes to this custom field:

    Edit /wp-admin/user-edit.php and add this after line 113:
    update_usermeta( $user_id, 'my_test', $_POST['my_test'] );

    It should look like this:
    else
    do_action('edit_user_profile_update', $user_id);
    update_usermeta( $user_id, 'my_test', $_POST['my_test'] );

    if ( !is_multisite() ) {

  • aecnu
    • WP Unicorn

    Greetings Ashley,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU Dev member!

    Cheers, Joe

  • Ashley Pearson
    • The Incredible Code Injector

    Hey. I managed to work with the text boxes. The checkboxes would have helped a lot but I could not work out how to add them sadly, so I had to leave them out and work around it.

    Thanks to everyone for their support with this issue. I can now leave it as resolved.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.