Re: HTML_Quickform and Renderer - no error-messages?
| From: | Brett Bieber | Date: | Thu, 22 Feb 2007 14:32:58 +0000 |
| Subject: | Re: HTML_Quickform and Renderer - no error-messages? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26641@lists.php.net to get a copy of this message | ||
Hey
On 2/22/07, Tobias Daur <daur@so-nso.de> wrote:
Hi, I'm stuck, using QF: After switching to using a Renderer (I want to use Tableless, but the problem occurs also with the Renderer_Default), my error-messages, defined in addRule() are gone. Klicking the formular without filled fileds shows the errors, when i drop the lines $renderer = ... $form->accept($renderer) and change echo $renderer->toHtml() to $form->display(); I thought, if i don't change anything in the Templates, the messages shoud be here ... Is this a known problem? thx for ideasHave you tried accepting the renderer after you run $form->validate()? Like: if($form->validate()) {
$form->process('verarbeite',false);
} else {
$form->accept($renderer);
echo $renderer->toHtml();
}
This is how it is used in the example
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm_Renderer_Tableless/docs/examples/contact.php?view=markup
--
-Brett Bieber
http:saltybeagle.com aim:ianswerq