SiteTreeListboxField::__construct
Creates a new dropdown field.
Signature
public function __construct(string
$name,
[string
$title = '',
[array
$source = ,
[string
$value = '',
[int
$size = NULL]]]] )
Parameters
$name
— string- The field name
$title
— string- The field title
$source
— array- An map of the dropdown items
$value
— string- You can pass an array of values or a single value like a drop down to be selected
$size
— int- Optional size of the select element