| Ken Restivo 2005-06-08, 8:57 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've spent the last month or so wrestling with QuickForm_Controller. I have almost defeated it, but it is putting up one hellacious fight.
The biggest challenge is that no code which makes use of $_REQUEST['blah'] can ever be expected to work with QFC. This is because QFC stores state in $_SESSION in between requests, and looks there for everything. Of course, I stupidly had $_REQUEST crap a
ll over my app.
What I have had to do in order to make my application QFC-compatible is:
1) Replace all uses of $_REQUEST with $page->getSubmitValues(), or the various $controller->container() access hacks that are documented in QFC's FAQ, and
2) Make sure that all my hidden's are actual $page->addElement('hidden', blah blah) in the parent form, instead of hacking them in using ->toHTML() methods.
This has often involved slipping references to the QF into my custom elements, much as Justin has done in his SubForm::setParentForm() method.
I'm just noting this so that it will appear in the archives; hopefully others will Google for it and thus save themselves some pain in the future.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCpzh5e8HF+6xeOIcRAu5LAJ9nZNOO47iz
CO4RiRWPmSUL1gSgmwCg2RGH
kiqgwHSN4sobEfAOYkdzd/E=
=2KxC
-----END PGP SIGNATURE-----
|