function form_options_from_text in Options Element 7
Same name and namespace in other branches
- 6 options_element.module \form_options_from_text()
Create an array representation of text option values.
If the Key of the option is within < >, treat as an optgroup
<Group 1> creates an optgroup with the label "Group 1"
<> Exits the current group, allowing items to be inserted at the root element.
3 calls to form_options_from_text()
- options_element_form_field_ui_field_settings_form_alter in ./
options_element.module - Implements hook_form_FORM_ID_alter().
- _form_options_validate in ./
options_element.inc - Logic function for form_options_validate(). Do not call directly.
- _form_type_options_value in ./
options_element.inc - Logic function for form_type_options_value(). Do not call directly.
File
- ./
options_element.module, line 173 - Defines an "options" form element type for entering select list options.
Code
function form_options_from_text($text, $key_type, $flat = FALSE, &$duplicates = array()) {
module_load_include('inc', 'options_element');
return _form_options_from_text($text, $key_type, $flat, $duplicates);
}