Custom Fields
Re-Envisioned
Support General User Field using Select Advanced should display User Full Name and Username too

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 4 months, 1 week ago.

  • Creator
    Topic
  • #14843

    Mauro
    Participant

    Hello Anh!
    Please note there is a shortcoming in how the users are displayed in the basic “user” field in MetaBox.

    When the users are listed and 2 users have the same first name or display name selected, there is no way to tell them apart!

    I would recommend to list all users as: [First-Name] [Last-Name] ([username])

    As an alternative, you could allow to customise how the users are shown in this field through its definition. I could not find any way to do so in the docs, so if this is already feasible please let me know how 🙂

    Thanks!
    Mauro

    PS: my code is:

    array(
    ‘id’ => $prefix . ‘submitted_by’,
    ‘type’ => ‘user’,
    ‘name’ => esc_html__( ‘Submitted By’, ‘timtopham’ ),
    ‘query_args’ => array(
    ‘role__in’ => array(‘author’,’administrator’,’mentor’),
    ),
    ‘field_type’ => ‘select_advanced’,
    ‘desc’ => esc_html__( ‘Pick a User’, ‘timtopham’ ),
    ),

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.