Home Forums Academy New registration field

New registration field

  • agnesdie

    Hi,
    I tried to add this code after line 11 in academy/template-register.php file:

    <div class=”field-wrapper”>
    <input type=”text” name=”last_name” placeholder=”<?php _e(‘Last Name’,’academy’); ?>” />
    </div>
    <br />

    And this code after line 245 in academy/framework/classes/themex.user.php file:

    if(empty(ThemexInterface::$messages)){
    $user=wp_create_user($data[‘user_login’], $data[‘user_password’], $data[‘user_email’]);
    $message=ThemexCore::getOption(’email_registration’, ‘Szia, %username%! Üdvözöllek a ‘.get_bloginfo(‘name’).’ oldalon.’);
    update_user_meta($user, ‘first_name’, sanitize_text_field($data[‘first_name’]));
    update_user_meta($user, ‘last_name’, sanitize_text_field($data[‘last_name’]));
    wp_new_user_notification($user);

    But it is not working. Can you help me please what do I need to do? Thanks, Agnes

    ihor Staff

    Please sign in or register to view replies from the support staff.

    agnesdie

    I got the new field on the register page, but the value wasn’t changed in user’s profile and the admin panel.

    ihor Staff

    Please sign in or register to view replies from the support staff.

    agnesdie

    Thank you so much!!! It’s working 🙂

    Isabell

    Hi there, this is great but I’m struggling to do the same with a phone number. Is this possible with a phone number?

    ihor Staff

    Please sign in or register to view replies from the support staff.

    Isabell

    Works perfectly, thank you!

    CecilioLanz

    How exactly would it work if I want to add a new field that captures the user’s company?

    CecilioLanz

    Right after Name, email, password and password re-enter.

    A new field that asks the users what company they belong to. And how would I set in up in the themex.user.php file?

    ihor Staff

    Please sign in or register to view replies from the support staff.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.