![]() |
Preserve Post - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Preserve Post (/showthread.php?tid=26351) |
Preserve Post - El Forum - 01-11-2010 [eluser]JREAM[/eluser] I saw this someplace but can't find it, I've been digging around the docs! When you submit a form, and the page reloads, How do you keep the previous POST data in the field? Preserve Post - El Forum - 01-11-2010 [eluser]Colin Williams[/eluser] Store it in the session. Or if you mean repopulated form fields, CI has a set_value() function for that. Preserve Post - El Forum - 01-11-2010 [eluser]Dyllon[/eluser] I may be mistaken but I believe JREAM is asking how to repopulate the form, if this is the case check the set_value function in the form helper. http://ellislab.com/codeigniter/user-guide/helpers/form_helper.html Preserve Post - El Forum - 01-12-2010 [eluser]JREAM[/eluser] Okay set_value() might be it. I might just do set_value() inside the controller via a Session, and unset it if it goes well. Preserve Post - El Forum - 01-12-2010 [eluser]Colin Williams[/eluser] If you need to maintain the POST data across an HTTP redirect, then use Session to preserve the data. Otherwise, forget I mentioned anything about sessions Preserve Post - El Forum - 01-12-2010 [eluser]JREAM[/eluser] Okay thanks, then Ill do it withuot sessions and see how she works ![]() |