Re: HTML_Quickform
| From: | arnaud sellenet | Date: | Thu, 25 Jan 2007 15:47:57 +0000 |
| Subject: | Re: HTML_Quickform | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26417@lists.php.net to get a copy of this message | ||
Don't you call $form->validate() AFTER accepting the renderer. If it's the case, the server-side errors won't show up
Le 25 janv. 07 à 15:25, Patrick Heckeler a écrit :
Hi folks, I've used the HTML_Quickform package to display some forms. To have a flexible design, I used the Quickhtml renderer: $this->renderer =& new HTML_QuickForm_Renderer_QuickHtml(); $this->addElement('text', 'zone', "Zone: ", array('class' => 'field', 'size' => 50, 'maxlength' => 255, 'value' => $post->getRaw('zone'))); . . . $this->addRule('zone', 'errormessage', 'required', null, 'server'); $this->accept($this->renderer); The form is displayed quite fine, but no error message is vissible after committing the form in a invalid state. The client-side validation works fine, but the error text ($this->setJsWarnings("pretext", "posttext");) is not changeable... Whats the correct way to get the error message from the form object, and how can I display it in my html template? I can't find a method to extract the error message from the form object! How can I change the js-popup text? $this->setJsWarnings("pretext", "posttext"); has no effect (but also occures no error)... Thanks a lot Patrick -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php