Take the 2-minute tour ×

I need a Mootools based autocompleter that retrieves data by ajax, and will fill in multiple form input elements when an option is selected. I.E, a user searches for "foo", and one of the options might be "foobar", which has associated with it the variables objecttype AND objectid, both of which need to be set in the form when the user clicks on "foobar".

I've been looking at two autocompleters: Meio.Autocomplete and AutoCompleter as my best bet, but neither of them really seem to handle what I need them to handle.

I'm considering either rewriting/extending one of those, or possibly using the Meio version (which handles a single value) and storing my multiple variable in the form in one field, possibly as a json object that can be parsed client side with jsonParse and inserted into the form with an additional function after the selection is made.

Does anyone know of a simpler solution?

share|improve this question
there's nothing to this - the results coming back can be simple json that you parse and then react upon. either of the two can do the job - I am currently using the digitarald one fine with complicated results coming in via JSON for 3 types of data. the meio one is written better and more recently updated so stick to that imo. –  Dimitar Christoff Jun 4 '11 at 17:38
add comment

1 Answer

up vote 1 down vote accepted

You could use the Meio.Autocomplete's onSelect event with an identifier, that JSON encodes all of the needed properties.

var data = [
    {value: 'name1', identifier: {
        id: 'id1',
        type: 'type1'

I made a quick example

share|improve this answer
add comment

Your Answer


