Page 1 of 1

radioList, a new line for each option?

Posted: Mon Dec 10, 2007 2:51 pm
by Urme
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)  ???

Re: radioList, a new line for each option?

Posted: Thu Dec 13, 2007 8:33 am
by zian974
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').

Re: radioList, a new line for each option?

Posted: Thu Dec 13, 2007 9:38 am
by Urme
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.