Firefox for some reason doesnt like to save form data.

For example, on a form on my site, the use hits submit w/ a POST request (on purpose). Say they forgot to fill in something or submitted on accident. The script checks to see if any required fields are empty() and then gives them an error message.

However, in firefox if you hit BACK it doesn't repopulate the form with the previously submitted data. IE does.

I know there is workaround to this like setting all the value parameters to the <input type> parts of the form equal to a $_SESSION var then just updating all of them when the user submits or something similar.

Firefox has a huge web presence now and i wanted to know how i can fix this without too much work.

I've already tried

header("Cache-Control: private");

Thanks.

    Originally posted by makeshift

    I know there is workaround to this like setting all the value parameters to the <input type> parts of the form ...

    I HIGHLY recommend this workaround. It at first sounds like a PITA, but its well worth it and 100% cross browser friendly.

    I don't know if I'd recommend using sessions. I prefer to go right back to the data they sent (either via post or get) and just repopulating it. Text fields are easy to do. Radio buttons and check boxes are a little harder and require a little thinking before hand. List boxes make it a bit of a challenge too, but depending on how you're building your list boxes, they can be surprisingly easy to manage too. And templating will DEFINITELY make your entire life easier, but may or may not be an option for you at this moment...

      Write a Reply...