Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.6.2

Bug #17364 Associate labels in group elements of type text
Submitted: 2010-05-03 14:49 UTC
From: jaures Assigned:
Status: Open Package: HTML_QuickForm_Renderer_Tableless (version 0.6.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 1 + 11 = ?

 
 [2010-05-03 14:49 UTC] jaures (Jaures Pedrelli)
Description: ------------ The labels of text element in the groups it isn't associated at the relative element Test script: --------------- <?php require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/Renderer/Tableless.php'; $form = new HTML_QuickForm('myform'); $form->removeAttribute('name'); $renderer =& new HTML_QuickForm_Renderer_Tableless(); $groupName = 'group_text'; $groupElementTemplate = "<label class=\"element\">{label}</label> {element}"; $renderer->setGroupElementTemplate($groupElementTemplate, $groupName); $groupElements = array(); $groupElements[] =& HTML_QuickForm::createElement('text', 'text1', 'Text 1:'); $groupElements[] =& HTML_QuickForm::createElement('text', 'text2', 'Text 2:'); $group = $form->addGroup($groupElements, $groupName, '<br />Text group:'); $form->accept($renderer); echo $renderer->toHtml(); ?> Expected result: ---------------- 2 text input element, 2 label associated Actual result: -------------- 2 text input element, 2 label not associated

Comments

 [2010-05-04 12:48 UTC] jaures (Jaures Pedrelli)