Re: QuickForm - finding out the formname from within an element class

From: Date: Fri, 10 Jan 2003 15:57:30 +0000
Subject: Re: QuickForm - finding out the formname from within an element class
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12244@lists.php.net to get a copy of this message
<jeroen@terena.nl> wrote : > > I have a question: > > From inside an element class how can I get the name of the form? I > suspect there is something like parent::parent::->name or something, but > I could not get anything to work. In the onQuickFormEvent method, there is a reference to the caller ($caller) which you can use. Look at the HTML_QuickForm_element class. Then use, $caller->getAttribute('name');. You must remember that name is an attribute of the form tag, just like action and methods. Bertrand Mansion Mamasam

« previous php.pear.dev (#12244) next »