Commit 7f083e0c authored by Dries's avatar Dries

- Patch #35570 by ccourtne and Steve: forms API does not adhere #return_value for checkboxes.

parent 16e9b4d0
......@@ -755,7 +755,7 @@ function expand_checkboxes($element) {
}
foreach ($element['#options'] as $key => $choice) {
if (!isset($element[$key])) {
$element[$key] = array('#type' => 'checkbox', '#processed' => TRUE, '#title' => $choice, '#default_value' => isset($value[$key]), '#attributes' => $element['#attributes']);
$element[$key] = array('#type' => 'checkbox', '#processed' => TRUE, '#title' => $choice, '#return_value' => $key, '#default_value' => in_array($key, $value), '#attributes' => $element['#attributes']);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment