radioList, a new line for each option?

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
Urme
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Aug 09, 2007 11:32 am

radioList, a new line for each option?

Post by Urme » Mon Dec 10, 2007 2:51 pm

Dunno if I'm seriously blind or something, I searched both Google and this forum but can't find the answer to my question.

I a radioList which looks like this:

Code: Select all

   $voluntary = array();
   $voluntary[] = mosHTML::makeOption('0','Option1');
   $voluntary[] = mosHTML::makeOption('1','Option2');
   $lists["voluntary"] = mosHTML::radioList($voluntary, 'voluntary', 'class="inputbox"', $row->voluntary );

 echo $lists["voluntary"];


How do I get each radio option on a new line? (with a br-tag for example)  ???
Last edited by Urme on Mon Dec 10, 2007 3:31 pm, edited 1 time in total.

zian974
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Sep 10, 2007 9:41 am

Re: radioList, a new line for each option?

Post by zian974 » Thu Dec 13, 2007 8:33 am

Hi,

try this :

Code: Select all

$lists["voluntary"] = mosHTML::radioList($voluntary, 'voluntary', 'class="radiobox" style="display:block"', $row->voluntary );


or in the css file :

.radioBox {
  ...
  display: block;
  ...
}

But mosHTML::makeOption and mosHTML::radioList  are deprecated I think it's better to use  JHTML::_('select.option') and  JHTML::_('select.radiolist').

Urme
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Aug 09, 2007 11:32 am

Re: radioList, a new line for each option?

Post by Urme » Thu Dec 13, 2007 9:38 am

Where can I find instructions how to install JHTML on Joomla 1.0.13?

I tried the display:block and it kind of works, but now the radiobutton ends up on it's own line then the label/text on new line.


Post Reply