JHtmlSelect::genericlist
Generates an HTML selection list.
Signature
public function genericlist(array
$data,
[string
$name = null,
[mixed
$attribs = null,
[string
$optKey = 'value',
[string
$optText = 'text',
[mixed
$selected = null,
[mixed
$idtag = false,
[boolean
$translate = false]]]]]]] )
Parameters
-
$data
- An array of objects, arrays, or scalars.
-
$name
- The value of the HTML name attribute.
-
$attribs
- Additional HTML attributes for the <select> tag. This
-
$optKey
- The name of the object variable for the option value. If
-
$optText
- The name of the object variable for the option text.
-
$selected
- The key that is selected (accepts an array or a string).
-
$idtag
- Value of the field id or null by default
-
$translate
- True to translate
Returns
- string
- HTML for the select list.