Re: handling forms
| From: | Thomas Schulz | Date: | Fri, 30 May 2003 16:00:57 +0000 |
| Subject: | Re: handling forms | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9612@lists.php.net to get a copy of this message | ||
Greg Donald wrote in php.smarty.general:
> What's the best way to handle a form submission? Should I make a
> template for the form and a seperate template for the completed
> submission reply?
You may also want to try this forms generation and validation class that
comes with Smarty support ;-)
http://pear.php.net/package-info.php?package=HTML_Quickform
"Smarty support" means the possibility to produce 2 different types of
arrays containing all form data (labels, types, values, errors, html for
the form-element, required and frozen-flags) for use in an Smarty
template:
Dynamic Array:
use this to render all forms in your project with one template. These
template must contain some {foreach} loops and {if} conditions.
Static Array:
use this to have full control over the form layout by free positioning
all form elements in one template per form.
You can find examples in PEAR/docs/HTML_QuickForm/docs/renderers after
installing the package.
ThS.
--
http://4bconsult.de