There is a simple way to solve this - but you have to alter the plugin
code:

1. Look for the `function hideResultsNow()`
2. Below the code

     else
         $input.val( "" );

I added this line:

         $input.trigger("result", null);

That's it - this makes the `result` event is triggered (with empty
data) when options.mustMatch clears the input field. Then following
works for me:

$('#city').result( function(event, row, formatted) {
     $(this).parent().parent().find('input[name="id"]').val( row ?
row.id : '' );
     });

Reply via email to