Re: QuickForm2 Static element

From: Date: Fri, 04 Feb 2011 17:39:37 +0000
Subject: Re: QuickForm2 Static element
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30947@lists.php.net to get a copy of this message
Hi Cedrick, On 04.02.2011 20:21, Cedrick Gout wrote:
Im having a question about the static element in the new milestone 0.5.0. If I'm correct this element allows me to enter static text or HTML in my form.. I tried the following: $fs = $this->form->addElement('fieldset')->setLabel('Overzicht'); $fs->addElement('static', 'MyStaticElement', 'Shouldn't this show up?');
This should be either $fs->addElement('static', 'MyStaticElement', array('content' => 'Shouldn't this show up?')); or $fs->addElement('static', 'MyStaticElement') ->setContent('Shouldn't this show up?'); We should probably use array type hinting in Node's constructor...
This shows an empty fieldset in my browser, and the following line in the source code: <div class="row"><label for="MyStaticElement-0" class="element"></label><div class="element"></div></div></fieldset> Notice that my text can't be found anywhere in the source code.


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