diff --git a/options_element.inc b/options_element.inc index d6a90cc..ac23ef7 100644 --- a/options_element.inc +++ b/options_element.inc @@ -197,7 +197,11 @@ function _form_options_expand($element) { function _form_options_validate($element, &$form_state) { // Convert text to an array of options. $duplicates = array(); - $options = form_options_from_text($element['#value']['options_text'], $element['#key_type'], empty($element['#optgroups']), $duplicates); + $options = array(); + // If a predefined value list is being used, options_text will not be set. + if (isset($element['#value']['options_text'])) { + $options = form_options_from_text($element['#value']['options_text'], $element['#key_type'], empty($element['#optgroups']), $duplicates); + } // Check if a key is used multiple times. if (count($duplicates) == 1) {