Bug #4252 [Opn->Csd]: HTML_QuickForm_Renderer_ITDynamic:Template example does not render group labels
| From: | alexmerz@php.net | Date: | Wed, 01 Jun 2005 14:27:09 +0000 |
| Subject: | Bug #4252 [Opn->Csd]: HTML_QuickForm_Renderer_ITDynamic:Template example does not render group labels | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-6144@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=4252&edit=1
ID: 4252
Updated by: alexmerz@php.net
Reported By: johis184 at student dot otago dot ac dot nz
-Status: Open
+Status: Closed
Type: Bug
Package: Documentation
Operating System: Debian Unstable
PHP Version: 4.3.10
New Comment:
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2005-05-01 01:10:30] johis184 at student dot otago dot ac dot nz
Description:
------------
http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-renderer-itdynamic.php
Under 'Template structure' the example template does not contain the
required tag for expected rendering of element labels.
<!-- BEGIN qf_group_element -->{qf_separator}{qf_element}<!-- END
qf_group_element -->
should be:
<!-- BEGIN qf_group_element -->{qf_separator}{qf_label}{qf_element}<!--
END qf_group_element -->
Hopefully the code below works and provides an example of where this
happens :) This is a pretty breif bug report but then its a pretty
trivial problem/fix, just very annoying if you are wondering why group
element labels are not being rendered and have worked off the example.
Reproduce code:
---------------
$form = new HTML_Quickform('login', 'POST', $_SERVER['PHP_SELF']);
$tmp[] =& HTML_Quickform::createElement('text', 'username',
'Username:', array('size'=>'22',maxlength=>'20'));
$tmp[] =& HTML_Quickform::createElement('text', 'password',
'Password:', array('size'=>'22',maxlength=>'20'));
$form->addGroup($tmp, 'login', 'Login:', ' ', false);
$template = new HTML_Template_Sigma('pathtotemplatedir');
$template->loadTemplatefile('pathtotemplate');
$renderer =& new HTML_QuickForm_Renderer_ITDynamic($template);
$form->accept($renderer);
$template->show();
Expected result:
----------------
Element labels.
Actual result:
--------------
No element labels.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=4252&edit=1