{html\_options} {#language.function.html.options} =============== `{html_options}` is a [custom function](#language.custom.functions) that creates the html `` tags are created, otherwise ONLY the ``, and display the groups. Recursion is supported with ``. - All parameters that are not in the list above are printed as name/value-pairs inside the `` tags. {html_options name=foo options=$myOptions selected=$mySelect} Output of the above example would be: assign('cust_ids', array(56,92,13)); $smarty->assign('cust_names', array( 'Joe Schmoe', 'Jane Johnson', 'Charlie Brown')); $smarty->assign('customer_id', 92); ?> The above arrays would be output with the following template (note the use of the php [`count()`](&url.php-manual;function.count) function as a modifier to set the select size). The above example would output: assign('contact_types',$db->getAssoc($sql)); $sql = 'select contact_id, name, email, contact_type_id from contacts where contact_id='.$contact_id; $smarty->assign('contact',$db->getRow($sql)); ?> Where a template could be as follows. Note the use of the [`truncate`](#language.modifier.truncate) modifier. 'Golf', 9 => 'Cricket',7 => 'Swim'); $arr['Rest'] = array(3 => 'Sauna',1 => 'Massage'); $smarty->assign('lookups', $arr); $smarty->assign('fav', 7); ?> The script above and the following template {html_options name=foo options=$lookups selected=$fav} would output: See also [`{html_checkboxes}`](#language.function.html.checkboxes) and [`{html_radios}`](#language.function.html.radios)