function form_options_from_text in Options Element 6
Same name and namespace in other branches
- 7 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.
2 calls to form_options_from_text()
- _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 172 - 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);
}