RE: [PEAR] Re: HTML_QuickForm getting all elements of a form

From: Date: Fri, 03 Dec 2004 10:19:08 +0000
Subject: RE: [PEAR] Re: HTML_QuickForm getting all elements of a form
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15988@lists.php.net to get a copy of this message
Martin Braun wrote on Friday, December 03, 2004 10:58 AM: > Sönke Ruempler wrote: >> Sorry, but I need a method for getting the element names / objects, >> not the submitted values ... > > It's just an ugly hack, but you could use exportValues() to get your > value /names/ and then use getElement() to actually get your objects: > > $elements = array_keys($form->exportValues()); > foreach ($elements as $elements) { > $objects[] =& $form->getElement($element); > } Thx, that is *really* ugly, but it works ;-) Maybe i should start a feature request. soenke

« previous php.pear.general (#15988) next »