Re: Some simple quickform question.

From: Date: Sun, 11 Aug 2002 12:32:20 +0000
Subject: Re: Some simple quickform question.
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2086@lists.php.net to get a copy of this message
Quoting Bertrand Mansion <bmansion@mamasam.com>: Hola Bertrand! Thank you for answering quickly. I got a followup: How can I get some of my elements on the same line? Example: I got some buttons that I want nicely on a line, also a checkbox that should be to the right of an element. Cheers! Tarjei > <tarjei@nu.no> wrote : > > > Hi, I'm just starting to learn how to use the Quickform package, and I got > a > > few > > questions: > > > > 1. CSS > > How can I add class="something" to different elements? > > I need to set this. > > Use $form->addElement('text', 'NAME', 'Your name:', > 'class=mycss'); > The 4th parameter of this method is your html attributes. As class is an > html attribute, you can use it here. You could also use: > $form->addElement('text', 'NAME', 'Your name:', > array('class'=>'mycss')); > > > 2. $form->addElement('button', 'actionID', 'something'); > > How do I use the third arg in addElement? Is this an array? i.e: > > $array = ('value'=>'5', size=>4); > > $form->addElement('button', 'actionID',$array); > > and then you got it? > > Usually, the third argument is the label of your element. > The fourth argument are the attributes. You can use whatever attributes you > want and define in an array or in a string. Choose whichever method fits > you > best. > > Bertrand Mansion > Mamasam > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Mob: 920 63 413 ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

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