Re: [SMARTY] if-else-routine bundled
Max Schwanekamp <[email protected]> Fri, 17 Nov 2006 09:05:13 -0800
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
Peggy Schatz wrote:
> ************in the template****************
>
> <td>{checkfield data=$templateVar value=$templateVar_value
> selected=$selected}</td>
For what it's worth, you might also consider using a form handling class
such as formsess, PEAR::HTML_QuickForm, etc. I use the latter, and my
template code is something like this:
<div{if $form.myelement.required} class="required">
<label for=$form.myelement.id>My Element Label</label>
{$form.myelement.html}
</div>
The renderer object for the form takes care of outputting the correct
markup for the input type.
FWIW!
--
Max Schwanekamp
NeptuneWebworks.com
541-517-9064
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php