Package proposal: HTML_QuickForm_Controller
| From: | Alexey Borzov | Date: | Tue, 26 Aug 2003 12:50:42 +0000 |
| Subject: | Package proposal: HTML_QuickForm_Controller | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-20553@lists.php.net to get a copy of this message | ||
Hi!
This is an add-on to HTML_QuickForm package which (as the name suggests) behaves like a Controller from MVC design pattern. It receives the name of the action from HTTP request data and calls the appropriate handler.
This allows, among other things, to build multipage forms, demos are available:
1) Wizard: http://oc.cs.msu.su/pear/wizard.php
2) Tabbed form: http://oc.cs.msu.su/pear/tabbed.php
The package handles storing form data in session between requests and validating the form as a whole. It includes the default handlers for common events to allow quick building of multipage forms.
Download package (installable via PEAR installer):
http://oc.cs.msu.su/pear/HTML_QuickForm_Controller-0.1.tgz
Source code
1) Base classes
http://oc.cs.msu.su/pear/HQC/Controller.phps
http://oc.cs.msu.su/pear/HQC/Page.phps
http://oc.cs.msu.su/pear/HQC/Action.phps
2) Default action handlers
http://oc.cs.msu.su/pear/HQC/Back.phps
http://oc.cs.msu.su/pear/HQC/Direct.phps
http://oc.cs.msu.su/pear/HQC/Display.phps
http://oc.cs.msu.su/pear/HQC/Jump.phps
http://oc.cs.msu.su/pear/HQC/Next.phps
http://oc.cs.msu.su/pear/HQC/Submit.phps
3) Examples
http://oc.cs.msu.su/pear/HQC/simple.phps
http://oc.cs.msu.su/pear/HQC/wizard.phps
http://oc.cs.msu.su/pear/HQC/tabbed.phps
This is exactly what should be called a subpackage for QuickForm and is proposed separately because the code is of beta quality and needs further testing while QuickForm itself is stable.