Inline editing with autoComplete shows ID instead of name

Inline editing with autoComplete shows ID instead of name

klinglerklingler Posts: 90Questions: 42Answers: 2
edited March 2020 in Free community support

Good afternoon (o;

Almost finished with my project ;-)

Does someone knows how to form the JSON data for autoComplete inline editing?
I return label and value in the "options" array like:

foreach($suppliers as $supplier)
{
    $array['options']['Supplier'][$i]['label'] = $supplier['name'];
    $array['options']['Supplier'][$i]['value'] = $supplier['supplierid'];
    $i++;
}

When I click in the cell the id is displayed instead of the name....
so I have to delete the id in the cell to be able to use autocomplete, which works...

As soon I selected from the autoComplete list, the id is displayed again....

The update works then as the id is sent with the POST....

thanks in advance
richard

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    Hi Richard,

    Is this with jQuery UI's AutoComplete library?

    I find that library really difficult to work with when you want to show the label rather than the value... See this SO thread for details on how you can override the default behaviour in jQueryy UI.

    Allan

This discussion has been closed.