Is there a smarty syntax similar to:
$this->smarty->assign('inputcategory', $this->CreateInputText($id, 'cat_name', $cat_name, 50, 255));
for creating a radio group?
Thanks,
Nullig
Radio Group
Re: Radio Group
Thanks.
Nullig
Nullig
Re: Radio Group
Trying to use the CreateInputRadioGroup function, but having a problem.
In using the above code, the labels for the radio buttons are showing as "cat_id" and "cat_name" and not the values assigned.
Where have I gone wrong?
Thanks,
Nullig
Code: Select all
$catlist = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_videocollector_category ORDER BY cat_name";
$dbresult = $db->Execute($query);
while ($dbresult && $row = $dbresult->FetchRow())
{
$onerow = new stdClass();
$onerow->cat_id = $row['id'];
$onerow->cat_name = $row['cat_name'];
$catlist[] = $onerow;
}
$this->smarty->assign('inputcat', $this->CreateInputRadioGroup($id, 'cat_id', $catlist[1], '1'));
Where have I gone wrong?
Thanks,
Nullig
Re: Radio Group
Example of CreateInputRadioGroup:Nullig wrote: Trying to use the CreateInputRadioGroup function, but having a problem.
Code: Select all
$view_map = $this->GetValueDB('view_map', $adding);
$view_maps = array('On'=>1, 'Off'=>0);
$ret[]= array($this->Lang('view_map').':',$module->CreateInputRadioGroup('','view_map', $view_maps, $view_map));
Code: Select all
........
$catlist[$row['cat_name']] = $row['id'];
........
Re: Radio Group
Perfect. Thanks alby.
Nullig
Nullig