Avatar of maqskywalker
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.
http://jsfiddle.net/DLLVw/

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?
jQuery

Avatar of undefined
Last Comment
maqskywalker

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rainer Jeschor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
maqskywalker

ASKER
Thanks. Great example
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23