Re: [QuickForm] Rules for a costum Form?
| From: | Frank Thiel | Date: | Thu, 06 Jun 2002 16:20:34 +0000 |
| Subject: | Re: [QuickForm] Rules for a costum Form? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1596@lists.php.net to get a copy of this message | ||
Hi, Bertrand.
Today i had time to make a new try.
just pass an array like this instead: $attributes = array('size' => 22, 'style' => 'WIDTH:183 px'); $form->addElement('text', 'ArticleHeadline', 'ArticleHeadline:',$attributes);That´s a very good idea.
You'd better try to isolate your problem by writing smaller tests.No i do have the same Problem like before. Without $form->clearAllTemplates();, it works! Yes, that´s right. No here is a smaller codetest: <?php require_once("HTML/QuickForm.php"); $form = new HTML_QuickForm('frmTest', 'POST', $PHP_SELF); $form->clearAllTemplates(); $form->addElement('text', 'BannerIMG', 'BannerIMG:', ''); $form->addElement('submit', null, 'Submit'); $form->addRule('BannerIMG', 'Dies ist ein Pflichtfeld', 'required'); if ($form->validate()) {
$form->freeze();} $form->display(); ?> THX for help. Frank Thiel