Custom rwmb_profile_register_fields do not save to usermeta?

Support MB User Profile Custom rwmb_profile_register_fields do not save to usermeta?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #49462
    CodogCodog
    Participant

    Hi there,
    I am using the MB AIO plugin (3.3.4) with the MB User Profile extension. Can you confirm the expected "saving" behaviour when adding additional "Custom" registration fields using the rwmb_profile_register_fields filter. For example using:

    add_filter( 'rwmb_profile_register_fields', 'custom_user_registration_fields' );
    function custom_user_registration_fields( $fields ) {
        $fields = [
            [
             // Additional Custom Registration Field
            'name'     => __( 'First name', 'understrap' ),
            'id'       => 'first_name',
            'type'     => 'text',
            'required' => true,
            ],
            // Other fields etc....
        ];
        return $fields;
    }

    This custom registration form implementation works but the custom "first_name" field does NOT get saved to the usermeta? Is this expected behaviour?

    Please confirm?

    Cheers 🙂

    #49469
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    first_name is the default field of WordPress for user so it won't be saved to the usermeta if you use the profile form. You can try with another field ID like first_name_abc and recheck this. Refer to the documentation
    https://docs.metabox.io/extensions/mb-user-profile/#default-fields

    #49475
    CodogCodog
    Participant

    Ok, thanks for clarifying 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.