I’m using the code for this combobox.
I thought I would be slick by commenting out this part, which would allow text entry beyond unmatched queries.
/*Commented out to allow user input
if (!valid) {
remove invalid value, as it didn't match anything
$(this).val("");
select.val("");
input.data("autocomplete").term = "";
return false;
}*/
The problem I’m running into with my cleverness is that I can’t get this value while validating the form in JS. Any ideas on how I could do this?
So I got around this. I created a hidden variable:
Then I edited part of the jquery combo to save the value typed into EnterYourOwnValue:
OR to saves the selected value into it:
Now the autocomplete combobox is hacked to be a select or enter your own value in one box!