Generates and returns an HTML dropdown
public static getDropdown ( string $select_name, array $choices, string $active_choice, string $id, string $class = '', string $placeholder = null ) : string | ||
$select_name | string | name for the select element |
$choices | array | choices values |
$active_choice | string | the choice to select by default |
$id | string | id of the select element; can be different in case the dropdown is present more than once on the page |
$class | string | class for the select element |
$placeholder | string | Placeholder for dropdown if nothing else is selected |
return | string | html content |