Displaying the value instead of the key

Created on 21 November 2012, about 12 years ago
Updated 15 September 2024, 2 months ago

Hi,

I am currently testing the autocomplete_deluxe's autocomplete_delux_path. The array returned by my callback function looks like:

return(
array(
'some-internal-id-1' => 'Label to display to user 1',
'some-internal-id-2' => 'Label to display to user 2',
'some-internal-id-3' => 'Label to display to user 3',
)
);

When the user sees the returned options, he sees the list of 'Label to display to user X' labels. However, when he clicks one of them, the 'key' is inserted into the autocomplete_delexu's field.

What I would like to be able to do is always to display the 'values' (the labels) and not the key of my array.

Is that possible?

Thanks,

Fred

💬 Support request
Status

Closed: outdated

Version

2.0

Component

Single values

Created by

🇨🇦Canada fgiasson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024