Support

Account

Home Forums ACF PRO using acf_form field type USER – display first name?

Solved

using acf_form field type USER – display first name?

  • Hi Guys,
    We have a form working on the website and it works without any issues. We’re using it to schedule different speakers at an event. Each of the speakers are users, so the group leader can pick from the entire userbase as to who is next in rotation.

    Inside of a “meeting” repeater (field_60248b8f9ab12), we have a field for “speaker” and it is assigned the Field Type “User”, with a return format of “User Object” (along with other fields etc)

    On the front end of the website, we show the table of who is coming up and everything works perfect.

    By default, in both the backend and the front web form, when we select the User, it shows the display name of the person.

    Is there a way to display the first & last name of the person in the dropdown rather than the display name? So instead of it showing “bbincs” it shows “Bobby Brown” – the actual name of the person?

    As I said, the form works just fine, and the display to normal users is fine as we use a table for display, it’s just our leadership team that sometimes can’t determine who the person is as the display name is so different from their first/lastname.

    field_60248b8f9ab12 is the Repeater Field.

    Standard form

       $event_update_fields = array('field_60248b8f9ab12');
        acf_form(array(
                'id'       => 'chapter-event',
                'post_id'  => $chapterid, //data received from Chapter dropdown on Leader Page (next section)
                'fields' => $event_update_fields,
                'submit_value' => __('Save Changes')
            ));

    Is there something I can add so that the Speaker Name (User) displays the first/lastname in the dropdown rather than their displayname?

    Thanks,

    Conor

  • Actually, the system shows the Display Name and the first/last name in the dropdown. But it’s sorted based on the Display Name.

    If there’s a way to not show the display name, and only the first/last name, that would be ideal.

  • Awesome. Thanks John.

    I swear I used the search both on here and Google (among others).

    I really appreciate you finding this and posting the link.

  • It helps to if you already know what your searching for, in this case I already knew what the hook was (acf/fields/user/result) so I could search for the exact thing I was looking for.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.