From 7f605cfb54e1f860a182d3001e0612fee7fd7970 Mon Sep 17 00:00:00 2001 From: micschk Date: Wed, 17 Oct 2012 12:06:02 +0300 Subject: [PATCH] NEW Disable items in DropdownField and GroupedDropdownField --- forms/DropdownField.php | 37 ++++++++++++++++++ forms/GroupedDropdownField.php | 30 ++++++++++++++- tests/forms/DropdownFieldTest.php | 64 ++++++++++++++++++++++++++++++- 3 files changed, 128 insertions(+), 3 deletions(-) diff --git a/forms/DropdownField.php b/forms/DropdownField.php index e1d018936..5115f28fd 100644 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -66,6 +66,14 @@ * ); * * + * Disabling individual items + * + * Individual items can be disabled by feeding their array keys to setDisabledItems. + * + * + * $DrDownField->setDisabledItems( array( 'US', 'GEM' ) ); + * + * * @see CheckboxSetField for multiple selections through checkboxes instead. * @see ListboxField for a single