Re: QFC Form attributes

From: Date: Wed, 01 Oct 2003 10:38:05 +0000
Subject: Re: QFC Form attributes
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8172@lists.php.net to get a copy of this message
<mikeatwork@ukonline.co.uk> wrote : > > >> -----Original Message----- >> From: Alexey Borzov [mailto:borz_off@cs.msu.su] >> >> Hi! >> >> Mike Carter wrote: >>> Using QF Controller how do I add on additional attributes >> to the main >>> Form definition used by all the pages? >>> >>> I've like to add: autocomplete="off" to appear in the <form> tag. >> >> > > http://pear.php.net/manual/en/package.html.html-quickform-controller.htm > l-quickform-page.html-quickform-page.php > > Thanks - it was more how to actually fit it all together. Knowing about > the constructor wasn't the hard bit. In the end (for anybody else who > is new to it) the answer was to do the following in each of my defined > Page classes:- > > class Page_Account_Membership extends HTML_QuickForm_Page > { > function Page_Account_Membership($formName) { > $this->HTML_QuickForm_Page($formName, 'post', '_self', > array('autocomplete' => 'off')); > } > ..etc... As HTML_QuickForm_Page extends HTML_QuickForm which in turn extends HTML_Common, you could also have done $this->updateAttributes(array('autocomplete'=>'off')); This is the preferred way. HTH Bertrand Mansion Mamasam

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