Link to home
Create AccountLog in
Avatar of maqskywalker

asked on

get jquery ui autocomplete selected id and save in hidden field then display on page on button click

I have this jquery  UI autocomplete.

Is there a way to get the selected id from the autocomplete but don't display it on select event.

Instead show the selected value when I click the button.

So for example if I pick Algeria from the autocomplete. It will display Algeria in the textbox and the id 18 in another textbox.

Is it possible to save the selected id in a hidden field and then when I click the button display the value that was stored in hidden field on the page?
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of maqskywalker


Thanks. Great example