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

Bug #19803 Repeat: client-side rules on repeated containers not removed correctly
Submitted: 2013-01-29 02:30 UTC
From: avb Assigned: avb
Status: Closed Package: HTML_QuickForm2 (version 2.0.0)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 2.0.1    
Subscription  
Comments Add Comment Add patch


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 : 48 - 18 = ?

 
 [2013-01-29 02:30 UTC] avb (Alexey Borzov)
Description: ------------ When running the test script: * click on "Add..." to add some repeated items * click on "x" to remove some of the added items * click on submit button Test script: --------------- $form = new HTML_QuickForm2('repeat-clientside-bug'); $group = new HTML_QuickForm2_Container_Group('testgroup'); $repeat = $form->addRepeat(null, array('id' => 'repeat-group'), array('prototype' => $group)); $group->addText('foo', array('size' => 10)); $group->addText('bar', array('size' => 10)); $group->addInputButton('remover', array('value' => 'x', 'class' => 'repeatRemove')); $group->addRule('required', 'Fill both fields', 2, HTML_QuickForm2_Rule::CLIENT_SERVER); $form->addButton('add', array( 'type' => 'button', 'onclick' => "document.getElementById('repeat-group').repeat.add(); return false;" ))->setContent('Add another item'); $form->addSubmit('submit', array('value' => 'Send this form')); Expected result: ---------------- client-side validation is run, validation errors are displayed Actual result: -------------- javascript error

Comments

 [2014-06-23 21:20 UTC] avb (Alexey Borzov)
-Status: Open +Status: Closed -Assigned To: +Assigned To: avb
Fixed in Git https://github.com/pear/HTML_QuickForm2/commit/d7e95795b9e00ae8c015ab5689392cf01abec845