Attribute Name | Type | Required | Default | Description |
---|---|---|---|---|
values | array | Yes, unless using options attribute | n/a | an array of values for dropdown |
output | array | Yes, unless using options attribute | n/a | an array of output for dropdown |
selected | string | No | empty | the selected array element |
options | associative array | Yes, unless using values and output | n/a | an associative array of values and output |
html_options is a custom function that creates html option lists with provided data. It takes care of which item is selected by default as well. Required attributes are values and output, unless you use options instead.
NOTE: As of Smarty 1.4.5, html_options now outputs xhtml compatible code.