You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a simple addition to Solar_Form: the ability to get a group of element infos by type. I use it to get the hidden elements from a form and although it can be implemented anywhere else, I think Solar_Form could offer such utility. :-)
/**
*
* Returns all elements of a certain type.
*
* @param string $type The element type.
*
* @return array List of elements.
*
*/
public function getElementsByType($type)
{
$list = array();
foreach ($this->elements as $name => $elem) {
if($elem['type'] == $type) {
$list[$name] = $elem;
}
}
return $list;
}
The text was updated successfully, but these errors were encountered:
This is a simple addition to Solar_Form: the ability to get a group of element infos by type. I use it to get the hidden elements from a form and although it can be implemented anywhere else, I think Solar_Form could offer such utility. :-)
The text was updated successfully, but these errors were encountered: