You are here

function select_or_other_expand_checkboxes in Select (or other) 6.2

Element process callback for Select (or other) checkboxes.

1 string reference to 'select_or_other_expand_checkboxes'
select_or_other_elements in ./select_or_other.module
Implementation of hook_elements().

File

./select_or_other.module, line 220
The Select (or other) module.

Code

function select_or_other_expand_checkboxes($element) {
  if (isset($element['#select_or_other_checkboxes']) && $element['#select_or_other_checkboxes']) {
    foreach (element_children($element) as $key) {
      $element[$key]['#return_value'] = check_plain($element[$key]['#return_value']);
      $element[$key]['#name'] = $element['#name'] . '[' . $element[$key]['#return_value'] . ']';
      $element[$key]['#value_callback'] = 'select_or_other_checkbox_value';
      $element[$key]['#pre_render'][] = 'select_or_other_checkbox_prerender';
    }
  }
  return $element;
}