If you want the extraParams passed to your data url to include other
form input values then you need to define the values as a function.
In that function use jquery to get the values of the other inputs.


        $("#addressCity").autocomplete('http://www.example.com/api/
getcities/', {
                minChars: 1,
                autoFill:false,
                extraParams: {
                        country: function() {
                                return $('#country').val();
                        },
                        region: function() {
                                return $('#region').val();
                        }
                }
        });

In this example the other input box IDs were 'country' and 'region'.
Both which need to filter the list of cities.

On Dec 18 2009, 7:27 pm, Simon Matthews <sam.applic...@googlemail.com>
wrote:
> I have a number of fields in a grid which are all using auto
> complete.  I want the extraParams function to be able to work out
> which field I am in so that I can return a differently filtered list.
> I don't seem to have access to the input variable?  Any clues?
>
> Thanks
>
> Simon

Reply via email to