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
Comment | File | Size | Author |
---|---|---|---|
#1 | label vs. key.png | 52.81 KB | LNakamura |
Comments
Comment #1
LNakamura CreditAttribution: LNakamura at Mediacurrent commentedHi, @fgiasson - I just tried out your scenario, but I see the value and not the key displayed in the Autocomplete Deluxe field.
I had to modify the return value so that it was JSON, which I assume you did as well:
See the results in the attached screenshot.
Are you still seeing this problem? Note that I'm running with the latest dev version (there have been a lot of fixes lately)...
Thanks!