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

Request #1681 Better access to grouped elements
Submitted: 2004-06-19 11:41 UTC
From: fd at pyoworks dot com Assigned: avb
Status: Closed Package: HTML_QuickForm2
PHP Version: Irrelevant OS: linux
Roadmaps: 0.1.0    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2007-04-05 21:26 UTC
Package:
Bug Type:
Summary:
From: fd at pyoworks dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-06-19 11:41 UTC] fd at pyoworks dot com
Description: ------------ Hi, it would be nice if there was better access to grouped elements. E.g. $form->getElement("element_name") does not work if the "element_name" Element is part of a group. Also, it should be possible to add and delete elements to/from created groups. Anyway, nice work :) Florian

Comments

 [2004-09-09 13:17 UTC] frutik at ukr dot net
This patch to group.php is usefull for me to access to grouped elements. ** * Gets the grouped elements by variable name * * @since hack * @access public * @return false, reference or array of references to group's elements */ function &getGroupElement($search) { $return = false; foreach($this->_elements as $i => $element) { if ( $element->_attributes["name"] == $search) { $return[] =& $this->_elements[$i]; } } if ( is_array($return) && count($return) == 1 ) { return $return[0]; } return $return; }
 [2006-06-08 13:14 UTC] avb (Alexey Borzov)
Moving feature requests to HTML_QuickForm2.
 [2006-10-12 21:34 UTC] avb (Alexey Borzov)
HTML_QuickForm2_Container class (already in CVS) has DOM-like interface for adding / removing / getting elements. Getting elements from nested Containers is supported. As both Form and Group classes will inherit from this, we may consider the feature request implemented. :)