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 #356

Bug in javascript code when group name is not appended

Details

Submitted2003-12-05 09:49 UTC
Frombmansion at mamasam dot com
Assignedmansion
StatusClosed
PackageHTML_QuickForm
PHP VersionIrrelevant
OSMacOSX
Roadmaps(Not assigned)

Comments

[2003-12-05 09:49 UTC] bmansion at mamasam dot com

Description:
------------
The javascript code that is generated by QuickForm is wrong when it comes to groups that have appendName set to false.

Reproduce code:
---------------
$name[] = &HTML_QuickForm::createElement('text', 'first', 'First');
$name[] = &HTML_QuickForm::createElement('text', 'last', 'Last');
$form->addGroup($name, 'name', 'Name:', null, false);

$form->addRule('name', 'First and Last are required', 'required', null, 'client');

Expected result:
----------------
Should check elements individually.

Actual result:
--------------
if (value == '' && !errFlag['name']) {
errFlag['name'] = true;
_qfMsg = _qfMsg + '\n - First and Last are required';
}

[2003-12-18 18:31 UTC] mansion at php dot net

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.