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.
$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?
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.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.