Preserve Post |
[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?
[eluser]Colin Williams[/eluser]
Store it in the session. Or if you mean repopulated form fields, CI has a set_value() function for that.
[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-gui...elper.html
[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.
[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
[eluser]JREAM[/eluser]
Okay thanks, then Ill do it withuot sessions and see how she works ![]() |
Welcome Guest, Not a member yet? Register Sign In |