JHTMLSelect
Description
Utility class for creating HTML select lists
Located in /joomla/html/html/select.php (line 23)
JHTMLSelect (Subpackage HTML)
Method Summary
string
booleanlist
(string $name, [string $attribs = null], [mixed $selected = null], [ $yes = 'yes'], [ $no = 'no'], [ $id = false])
string
genericlist
(array $arr, string $name, [string $attribs = null], [string $key = 'value'], [string $text = 'text'], [mixed $selected = NULL], [ $idtag = false], [ $translate = false])
string
integerlist
(int $start, int $end, int $inc, string $name, [string $attribs = null], [mixed $selected = null], [string $format = ""])
object
option
(string $value, [string $text = ''], [string $value_name = 'value'], [string $text_name = 'text'], [ $disable = false])
string
options
(array $arr, [string $key = 'value'], [string $text = 'text'], [mixed $selected = null], [ $translate = false])
string
radiolist
(array $arr, string $name, [string $attribs = null], [mixed $key = 'value'], [string $text = 'text'], [string $selected = null], [ $idtag = false], [ $translate = false])
Methods
Generates a yes/no radio list
string
booleanlist
(string $name, [string $attribs = null], [mixed $selected = null], [ $yes = 'yes'], [ $no = 'no'], [ $id = false])
- string $name: The value of the HTML name attribute
- string $attribs: Additional HTML attributes for the <select> tag
- mixed $selected: The key that is selected
- $yes
- $no
- $id
Generates an HTML select list
string
genericlist
(array $arr, string $name, [string $attribs = null], [string $key = 'value'], [string $text = 'text'], [mixed $selected = NULL], [ $idtag = false], [ $translate = false])
- array $arr: An array of objects
- string $name: The value of the HTML name attribute
- string $attribs: Additional HTML attributes for the <select> tag
- string $key: The name of the object variable for the option value
- string $text: The name of the object variable for the option text
- mixed $selected: The key that is selected (accepts an array or a string)
- $idtag
- $translate
Generates a select list of integers
string
integerlist
(int $start, int $end, int $inc, string $name, [string $attribs = null], [mixed $selected = null], [string $format = ""])
- int $start: The start integer
- int $end: The end integer
- int $inc: The increment
- string $name: The value of the HTML name attribute
- string $attribs: Additional HTML attributes for the <select> tag
- mixed $selected: The key that is selected
- string $format: The printf format to be applied to the number
object
optgroup
(string $text, [string $value_name = 'value'], [string $text_name = 'text'])
- string $text: The text for the option
- string $value_name: The returned object property name for the value
- string $text_name: The returned object property name for the text
object
option
(string $value, [string $text = ''], [string $value_name = 'value'], [string $text_name = 'text'], [ $disable = false])
- string $value: The value of the option
- string $text: The text for the option
- string $value_name: The returned object property name for the value
- string $text_name: The returned object property name for the text
- $disable
Generates just the option tags for an HTML select list
string
options
(array $arr, [string $key = 'value'], [string $text = 'text'], [mixed $selected = null], [ $translate = false])
- array $arr: An array of objects
- string $key: The name of the object variable for the option value
- string $text: The name of the object variable for the option text
- mixed $selected: The key that is selected (accepts an array or a string)
- $translate
Generates an HTML radio list
string
radiolist
(array $arr, string $name, [string $attribs = null], [mixed $key = 'value'], [string $text = 'text'], [string $selected = null], [ $idtag = false], [ $translate = false])
- array $arr: An array of objects
- string $name: The value of the HTML name attribute
- string $attribs: Additional HTML attributes for the <select> tag
- mixed $key: The key that is selected
- string $text: The name of the object variable for the option value
- string $selected: The name of the object variable for the option text
- $idtag
- $translate




JHTMLSelect (Subpackage HTML)