jfquestiaux
Well-Known Member
This is the first time I use this feature, so I need some help:
I need to generate a certain amount of options based on some outside condition: 1 to a value that a retreive in the URL.
This part is easy.
I then generate the expected values in the "eval populate" window.
I can come up with the following string ("4" being the value I retreived):
If I manually copy the value of the string in
I get the expected dropdown.
But how should I write the "return" line so it works on its own?
I tried
but it's not working.
I need to generate a certain amount of options based on some outside condition: 1 to a value that a retreive in the URL.
This part is easy.
I then generate the expected values in the "eval populate" window.
I can come up with the following string ("4" being the value I retreived):
PHP:
$options = "JHTML::_('select.option','1','Room 1'),JHTML::_('select.option','2','Room 2'),JHTML::_('select.option','3','Room 3'),JHTML::_('select.option','4','Room 4')";
If I manually copy the value of the string in
PHP:
return array(JHTML::_('select.option','1','Room 1'),JHTML::_('select.option','2','Room 2'),JHTML::_('select.option','3','Room 3'),JHTML::_('select.option','4','Room 4');
I get the expected dropdown.
But how should I write the "return" line so it works on its own?
I tried
PHP:
return array($options);