FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17365&edit=1

ID: 17365
Updated by: daniel.oconnor@gmail.com
Reported By: pedrelli at infotel dot it
Summary: Associate labels in group elements of type text
-Status: Open
+Status: Duplicate
Type: Bug
Package: HTML_QuickForm_Renderer_Tableless
Package Version: 0.6.1
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

-Status: Open
+Status: Duplicate
Bug #17364


Previous Comments:
------------------------------------------------------------------------

[2010-05-03 10:51:42] jaures

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

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 3, '10 at 12:10p
activeMay 3, '10 at 12:10p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase