- Use an auto complete that only relies on Ajax results, and does not allow multiple items
- Your first search result should return only 1 element, this is important. E.g. type "X" where only one items matches X.
- The X item shows in the suggestions
- The X item does not show up
The auto complete code uses the property selected of the option tags to determine whether or not the item is currently selected. But, as the select only contains 1 element, the browse flags it as selected.
Submitting the form will submit the X item without the user's knowledge!