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  
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 - 5 = ?

 
 [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. :)