silverstripe-framework/forms/GroupedDropdownField.php
Sean Harvey 8dff62d3cb API CHANGE Deprecated GroupedDropdownField, DropdownField should now be used instead
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
2008-08-25 08:58:38 +00:00

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();
}
}
?>