Re: Re: funny behaviour of the static element

From: Date: Wed, 23 Aug 2006 22:02:50 +0000
Subject: Re: Re: funny behaviour of the static element
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24978@lists.php.net to get a copy of this message
On 8/23/06, Mark Wiesemann <wiesemann@php.net> wrote:
Bjoern Mittelsdorf wrote: while trying to corrupt quickform, I noticed some funny behaviour of static elements: I wanted a static element in the form table but wanted its text to span the whole width, so i tried: $newform->addElement( 'static', "Hilfe", "Blabla", array( 'colspan' => '2') ) ; It seems that you haven't looked at this page? http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-static.html-quickform-static.php Output: -------+-----------+
Blabla | array     |
Your array was converted to a string, which results in the string 'Array'. I do not understand, but I got a solution to my problem, like this :) $newform->addElement( 'static', "Hilfe", "", "Blabla" ) ; See my link, you will understand it then. Maybe you also want to have a look at the 'html' QF element if you to have the text really span about both columns.
The html element is deprecated and generally discouraged. Try setting the element template instead. $r =& HTML_QuickForm::defaultRenderer(); $r->setElementTemplate('....template....', '....element name....'); -- Justin Patrin

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