Home » HTML » HTML_QuickForm » Bug #5079
addGroup() adds 'separator' value after last element
Details
| Submitted | 2005-08-12 20:24 UTC |
|---|---|
| From | jrossiter at pheedo dot com |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | N/A |
| Roadmaps | (Not assigned) |
Comments
[2005-08-12 20:24 UTC] jrossiter at pheedo dot com
Description:
------------
Tested on 3.2.2, 3.2.5
The separator param to addGroup inserts a text separator between elements in the group. The separator should not be inserted after the last item in the group.
Test script:
---------------
<?
$bar[0] =& HTML_QuickForm::createElement("text", 'foo', '', array('size' => 5, 'maxlength' => 10));
$bar[1] =& HTML_QuickForm::createElement('text', 'baz', '', array('size' => 5, 'maxlength' => 10));
$form->addGroup($bar, "foobar", 'Fill in', 'and');
?>
This yields the output
"Blah [] and [] and" (where [] is a text input)
Expected result:
----------------
Separator should not follow the final element.
Actual result:
--------------
Separator follows the final element