Re: [ANNOUNCEMENT] HTML_Template_Flexy-0.9.2 (beta) Released.
| From: | Alan Knowles | Date: | Fri, 02 Jul 2004 05:32:13 +0000 |
| Subject: | Re: [ANNOUNCEMENT] HTML_Template_Flexy-0.9.2 (beta) Released. | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13450@lists.php.net to get a copy of this message | ||
A very old version of Flexy tried to use Quickforms directly to build forms. However it ran into a number of issues:
a) The Heavy use of aliasing often broke, or was very clunky to deal with.
b) It was almost impossible to deal with multiple forms on a single page.
c) Validation was just to messy to deal with using flexy::validate="somerule"
d) Almost all the forms I worked with needed to be visually laid out, so quickforms rarely solved a pure form solution for me.
.... quite a few more (mainly revolving around the fact that Quickforms takes control of the input vars (_GET/_POST) etc. that eventually made integration too painfull for me.)
In theory it is possible to replace the elements in the template with QF elements (eg. something like this..
$flexy->output($this, array(
'name' => $qf->getElement('name'),
'age' => $qf->getElement('get'),
)....
In the end however, I normally use the
HTML_Template_Flexy_Factory::*() methods to do most of what QF provides.
I normally do Validation using Gtk_Validate_Manager, (http://devel.akbkhome.com/svn/index.php/akpear/Gtk_ValidateManager/) which is a manager that provides rule creation / association with Post vars etc, (and utilizes Validate::*)
These are the code I wrote a long while ago, to automate form/database interaction to some degree (you still need to design the form in HTML)
http://devel.akbkhome.com/svn/index.php/akpear/HTML_DataObject/DataObject/
The design of these is still a little messy however, but it does work.
I dont use QF forms now, so I cant provide much more that a view that Flexy's Element object does most of the things that QF appears to provide (except validation).. it's up to you to decide how you wish to work.. - there is nothing stopping you from doing :
{quickform.toHtml():h} in the template to use a pure quickform solution.
Regards
Alan
Jacques wrote:
Hi my friends! I have a litle doubt about Template_Flexy_Elements and QuickForm. It´s possible to use only Template_Flexy_Elements (with server/client validations) to build my forms, or i need to use too the QuickForm? What is the best solution? Only Template_Flexy_Elements, only QuickForm ou QuickForm renderer with flexy? Jacques, from Brazil-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com