search by label update with id on autocomplete

search by label update with id on autocomplete

amir7shamir7sh Posts: 15Questions: 4Answers: 0

hi
i am beginner in jquery
i want use autocomplete plugin in custom case , search by label update with id :

{
                label: "location",
                name: "address_book.location",
                "type": "autoComplete",
             "opts": {
               "source": "order-get-locations-data.php",
               select: function(event, ui) {
                   editor.field( 'address_book.location' ).data(ui.item.id) ; 
                        
                    }
             }
            }

how can i do ?
thank

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Personally I find the jQuery UI AutoComplete library quite difficult to work with. You might find it easier using Select2 or Selectize which are generally better for this kind of thing.

    I'm actually considering removing the AutoComplete plug-in from the Editor plug-ins.

    Regards,
    Allan

  • amir7shamir7sh Posts: 15Questions: 4Answers: 0

    thank allan.

This discussion has been closed.