QF + ITStatic renderer: group error message

From: Date: Thu, 11 Dec 2003 00:28:37 +0000
Subject: QF + ITStatic renderer: group error message
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9469@lists.php.net to get a copy of this message
Hi, using QF 3.2 with ITStatic renderer I want to control where the error message for a radio group is displayed. This is what I tried (in vain as you might anticipate): $radio[] = &HTML_QuickForm::createElement('radio', 'speed', null, '', '1'); $radio[] = &HTML_QuickForm::createElement('radio', 'speed', null, '', '2'); $radio[] = &HTML_QuickForm::createElement('radio', 'speed', null, '', '3'); $radio[] = &HTML_QuickForm::createElement('radio', 'speed', null, '', '4'); $form->addGroup($radio, 'speed', 'the internet is fast enough:', '|'); $form->addGroupRule('speed', 'please judge the following statement:', 'required'); $renderer->setRequiredTemplate('{label}<font color="red" size="1">*</font>'); $renderer->setErrorTemplate('<font color="orange" size="1">{error}</font><br />{html}'); The template section looks like this: <table border="0" cellpadding="4"> <!-- BEGIN form_speed_error --> <tr> <td class="error">{form_speed_error}</td> </tr> <!-- END form_speed_error --> <tr> <td>{form_speed_label}</td> </tr> <tr> <td>{form_speed_html}</td> </tr> </table> I was expecting the error message to be displayed in the form_speed_error block. Instead this block is not replaced and the error message is displayed above the radio buttons. There is another group on the same page which works as expected: $name['surname'] = &HTML_QuickForm::createElement('text', 'surname', 'Surname', 'size=10'); $form->addGroup($name, 'name', 'Name:', ',&nbsp;'); $form->addGroupRule('name', 'Name is required', 'required'); template section: <!-- BEGIN form_name_error --> <table bgcolor="#00FFFF"> <tr> <td>{form_name_error}</td> </tr> </table> <hr> <!-- END form_name_error --> <table width="100%" cellpadding="4"> <tr> <td class="label">{form_name_label}</td> <td class="element"> <table cellspacing="0" cellpadding="1"> <tr> <td>{form_name_surname_html}</td> </tr> <tr> <td><font size="1" color="grey">{form_name_surname_label}</font></td> </tr> </table> </td> </tr> </table> Thank you for reading. Can somebody point me to the right direction? Regards, Joerg

« previous php.pear.general (#9469) next »