mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT DropdownField now allows for <optgroup> elements in the field source by passing in a two dimensional array - this was taken from GroupedDropdownField git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61485 467b73ca-7a2a-4603-9d3b-597d59a354a9
27 lines
708 B
PHP
Executable File
27 lines
708 B
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* Grouped dropdown, using <optgroup> tags.
|
|
*
|
|
* @deprecated - Please use DropdownField instead!
|
|
*
|
|
* $source parameter (from DropdownField) must be a two dimensional array.
|
|
* The first level of the array is used for the <optgroup>, and the second
|
|
* level are the <options> for each group.
|
|
*
|
|
* Returns a <select> tag containing all the appropriate <option> tags, with
|
|
* <optgroup> tags around the <option> tags as required.
|
|
*
|
|
* @package forms
|
|
* @subpackage fields-basic
|
|
*/
|
|
class GroupedDropdownField extends DropdownField {
|
|
|
|
function Field() {
|
|
user_error('GroupedDropdownField is deprecated. Please use DropdownField instead.', E_USER_NOTICE);
|
|
|
|
return parent::Field();
|
|
}
|
|
}
|
|
|
|
?>
|