Re: QuickForm w/Smarty: Defaults render when form has error
| From: | Thomas Schulz | Date: | Mon, 05 Jan 2004 11:34:22 +0000 |
| Subject: | Re: QuickForm w/Smarty: Defaults render when form has error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9964@lists.php.net to get a copy of this message | ||
Tim Weichman wrote in php.pear.general:
> And then my smarty template just looks like this:
>
> <tr>
> <td>{$form.radio.yes.html}</td>
> <td>{$form.radio.yes.label}</td>
> </tr>
> <tr>
> <td>{$form.radio.no.html}</td>
> <td>{$form.radio.no.label}</td>
> </tr>
>
> If anyone is able to solve this, I promise to give you my first-born!
Tim, it's not a good idea to contact the autors by mail.
Here is an working example.
$pic2[] = &HTML_QuickForm::createElement('radio', null, 'No Pic', null,
'no');
$pic2[] = &HTML_QuickForm::createElement('radio', null ,'Upload Pic', null,
'upload');
$form->addGroup($pic2, 'pic2', 'Picture 2');
<b>{$form.pic2.label}:</b><br>
{$form.pic2.no.label}: {$form.pic2.no.html}<br>
{$form.pic2.upload.label}: {$form.pic2.upload.html}<br>
ThS.
--
http://4bconsult.de