function _webform_select_options in Webform 7.4
Same name and namespace in other branches
- 5.2 components/select.inc \_webform_select_options()
- 6.3 components/select.inc \_webform_select_options()
- 6.2 components/select.inc \_webform_select_options()
- 7.3 components/select.inc \_webform_select_options()
Generate a list of options for a select list.
16 calls to _webform_select_options()
- webform_conditional_form_select in includes/
webform.conditionals.inc - Form callback for select-type conditional fields.
- webform_conditional_operator_select_greater_than in includes/
webform.conditionals.inc - Conditional callback for select comparisons.
- webform_conditional_operator_select_greater_than_equal in includes/
webform.conditionals.inc - Conditional callback for select comparisons.
- webform_conditional_operator_select_less_than in includes/
webform.conditionals.inc - Conditional callback for select comparisons.
- webform_conditional_operator_select_less_than_equal in includes/
webform.conditionals.inc - Conditional callback for select comparisons.
File
- components/
select.inc, line 913 - Webform module multiple select component.
Code
function _webform_select_options($component, $flat = FALSE, $filter = TRUE) {
if ($component['extra']['options_source']) {
$options = _webform_select_options_callback($component['extra']['options_source'], $component, $flat);
}
else {
$options = _webform_select_options_from_text($component['extra']['items'], $flat);
}
// Replace tokens if needed in the options.
if ($filter) {
$node = node_load($component['nid']);
$options = _webform_select_replace_tokens($options, $node);
}
return isset($options) ? $options : array();
}