Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3800

Autocomplete select

$
0
0

Hi,

What is the easiest way to add an autocomplete select?

Has anyone got an example?

Using Select2?

Just found this:

https://editor.datatables.net/plug-ins/field-type/editor.autoComplete

The list of options needs to come from a MySQL table.

Thanks,

Mick

EDIT: Almost got this working now, just need to change the source to get the data from the DB.

Something like this maybe.

"opts": {
                                    "source": function( request, response ) {
                                      $.getJSON("/autocomplete/faults", {
                                        term: extractLast(request.term)
                                    }, response);
                                    }
                                }

From: https://jqueryui.com/autocomplete/#multiple-remote


Viewing all articles
Browse latest Browse all 3800

Trending Articles