Forum Moderators: coopster
I was wondering if there is an easy to have the particular country that the user selected re-selected, if the user is returned back to the form based on an error on the rest of the form.
For example, if they have accidently submitted a blank field somewhere on the rest of the form and they are returned to the same form to correct the problem, I would like the country dropdown box to have what they previously selected, re-selected.
Is there some way to do this with the country dropdown box without about 250 'if' statements?
Cheers!
Is there some way to do this with the country dropdown box without about 250 'if' statements?
Do you get the values from the database? If you do, while looping them for display, you can compare values, and insert "selected='selected'" in the right option tag.
Without posting much of the code, post part of the code here.
[edited by: Habtom at 6:39 am (utc) on Aug. 14, 2007]