In a nutshell, the best way to go about this is to save all the data into hidden elements on the error page, and then have your back button post all that form data back via POST, and repopulate the text fields with that data. Obviously you'll want to invent a scheme where it is all automated, and you just put something like the following as the value for your form text field elements:
And make sure that everything you posted to the page before the page you are on is carried over. This might cause some slowdown, but it is all I can think of. using GET would work if the code didn't need to be secure.