PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #5079

addGroup() adds 'separator' value after last element

Details

Submitted2005-08-12 20:24 UTC
Fromjrossiter at pheedo dot com
StatusBogus
PackageHTML_QuickForm
PHP VersionIrrelevant
OSN/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