• Resolved wafa1999

    (@wafa1999)


    Hi . I want to know how can I change input field name in the registration form . I like to change name to Full name . You can suggest me code to add to snippets so that I can change the input field name . Thank you .

    https://prnt.sc/ps8nrb1Q8Ic7

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @wafa1999

    1. You can use loco translate plugin https://wordpress.org/plugins/loco-translate/ to change the texts without coding.
    2. If you know to code, you can use this filter hook whols_registration_fields to customize the labels.

    Hook defination is:
    $fields = apply_filters( 'whols_registration_fields', $default_fields );

    If you have any questions, please let us know.

    Thanks!

    • This reply was modified 1 year, 7 months ago by HasThemes.
    Thread Starter wafa1999

    (@wafa1999)

    Hi , I know to code . But I am new to wordpress hooks . So i want to get full code rather than installing another plugin ..Could you please describe me full code on changing just ‘name’ to ‘full name’ .

    Hi @wafa1999

    We recommend using loco translate because after doing the translations you won’t lose the customizations even after deleting the plugin after translation.

    Anyway, it’s beyond our customer support when it comes to advanced custom coding, anyway for now we are providing the code below for you.

    add_filter('whols_registration_fields', function($fields){
        // echo '<pre>';
        // var_dump($fields);
        // echo '</pre>';
    
        $fields['reg_name']['label'] = 'Name (new)';
        $fields['reg_username']['label'] = 'Username (new)';
    
        return $fields;
    });

    Note: The code above was tested and works properly from our side.

    Please check now.

    Thanks!

    • This reply was modified 1 year, 7 months ago by HasThemes.
    Thread Starter wafa1999

    (@wafa1999)

    Thanks that worked . Thankd for your support !

    You are most welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change input field name’ is closed to new replies.