Re: [SMARTY] if-else-routine bundled
| From: | Max Schwanekamp | Date: | Fri, 17 Nov 2006 17:05:13 +0000 |
| Subject: | Re: [SMARTY] if-else-routine bundled | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13580@lists.php.net to get a copy of this message | ||
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