Re: FormBuilder and linkNewValue

From: Date: Thu, 14 Jul 2005 14:47:54 +0000
Subject: Re: FormBuilder and linkNewValue
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20000@lists.php.net to get a copy of this message
On 7/14/05, Rodrigo Alvarez <papipo@gmail.com> wrote: > Justin Patrin wrote: > > On 7/13/05, Rodrigo Alvarez <papipo@gmail.com> wrote: > > > >>Hi PEARs, > >> > >>I'm trying to use linkNewValue, but i get the following error: > >> > >>Fatal error: Call to undefined function: setformtemplate() in > >>/usr/share/php/DB/DataObject/FormBuilder/QuickForm/SubForm.php on line 137 > >> > >>I'm using Object renderer, and a custom FB class for setting some options: > >> > > > > [snip] > > > >> > > > > > > The SubForm type currently only works with the default renderer. > > Mostly this is because it has to remove the <form> tags on the > > sub-form. It also currently only supports toHtml. > > > > I've made some changes to the SubForm.php in CVS that should hopefully > > allow it to work for you. Please check it out and see. > > > > It works now, thanks!! > > Anyway, I get the default 'denotes required field' message, although i > set it in my custom formbuilder to Spanish lang (in the "normal" fiels > it's ok). It shows a grey label with the dataobject classname above the > input too. How can I change those things? > The Sub-Form uses the default QF renderer and uses a fresh FormBuilder, so it won't have ant options you put in your "main" formbuilder. Either set the options with PEAR::setStaticProperty or set them in the sub-form's DO class. If you want to change the look of the sub-form alter the renderer that you get from HTML_QuickForm::defaultRenderer() -- Justin Patrin

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