I'm working on some simple forms with F3, and I'm wondering what the best way to re-load form data is in case there are form validation errors.
Currently my overall process is:
- POST the form to my class.
- Class validates the POST data.
- If any error, send a message to the template system and reroute to the same page again.
I would typically use SESSION variables for this, however I think it may make more sense to simple set up a new variable, such as:
$this->f3->set('formRefill','POST');
Is this frowned upon for any reason?
Additionally, would I need to ensure that this is CLEARED/UNSET in my "afterroute" function?
Thanks for the help.