I've got a checkout form where the user fills in their billing and shipping information. When they submit shipping gets calculated and payment processing occurs. If there is an error during either of these 2 stages it's displayed on screen and then when you go back to the form it's empty again.
I was able to fix most of the form fields because I keep everything in session variables so I set the initial value of text fields to check if the session exists and then use it for the initial value if it does. This pre-populates most of the fields for me which is nice, but it's not that easy with big drop down menus where you just have to put selected="selected" on the option to make it the default.
So as it stands now all of my text fields get pre-populated but I haven't taken the time to fix all of the drop downs. they go back to default when you get back to this page and you have to set them again.
Is there any way to get around this problem or just get the browser to keep the fields even after posting the form and coming back?