Re: Re: [QuickForm] Rules for a costum Form?
| From: | Frank Thiel | Date: | Fri, 07 Jun 2002 11:55:05 +0000 |
| Subject: | Re: Re: [QuickForm] Rules for a costum Form? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1608@lists.php.net to get a copy of this message | ||
Hell Bertrand,
Sorry, I forgot what your problem was :-):-)
Tell me if I am clear enough.Yes this was clear enough. Now i do have this code and it works: <?php require_once("HTML/QuickForm.php"); $form = new HTML_QuickForm('frmTest', 'POST'); $form->clearAllTemplates(); $form->addData('<table cellspacing="0" cellpadding="0" border="1"><tr><td>'); $form->addElement('text', 'BannerIMG', 'BannerIMG:'); $form->addData('</td></tr>'); $form->addData('<tr><td>'); $form->addElement('submit', null, 'Submit'); $form->addData('</td></tr></table>'); $form->setElementTemplate("<!-- BEGIN required -->*<!-- END required --><b>{label}</b><br> <!-- BEGIN error -->{error}<br><!-- END error -->{element}"); $form->addRule('BannerIMG', 'Dies ist ein Pflichtfeld', 'required'); if ($form->validate()) {
$form->freeze();} $form->display(); ?> Many thanks for your help. Best wishes Frank Thiel