Re: QuickForm - can you have radio buttons display on same line, not separated by <BR>?

From: Date: Fri, 12 Nov 2004 14:43:47 +0000
Subject: Re: QuickForm - can you have radio buttons display on same line, not separated by <BR>?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15471@lists.php.net to get a copy of this message
> Here's my code: > > > $form->addElement('radio','show','Display:','Yes','Y'); > $form->addElement('radio','show',null,'No','N'); > > It displays like this: > Display: Yes > No > > I'd rather display it like this: > Display: Yes No > > Thanks in advance for any help or ideas. You have to make it a group of elements, so that they are rendered in one place. Here's my code: // $g = array (); $g[] =& $form->createElement ( 'radio', 'show', null, 'Yes', 'Y' ); $g[] =& $form->createElement ( 'radio', 'show', null, 'No', 'N' ); $form->addGroup ( $g, 'radShow', 'Display:' ); More info here: http://pear.php.net/manual/en/package.html.html-quickform.php#package.html.html-quickform.groups -- I. M. Bur buralien@gmail.com

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