From fd96728f3ca312214c4e2ff58649a8ae338b1754 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 9 Oct 2005 10:39:15 +0000 Subject: - Second batch of form API fixes by chx. --- includes/form.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/form.inc b/includes/form.inc index 42240001c..fa7e56368 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -651,7 +651,7 @@ function theme_select($element) { if (is_array($choice)) { $select .= ''; foreach ($choice as $key => $choice) { - $select .= ''; + $select .= ''; } $select .= ''; } @@ -781,7 +781,8 @@ function expand_date($element) { /** - * Roll out a single checkbox element to a list of checkboxes, using the options array as index. + * Roll out a single adios element + * to a list of radios, using the options array as index. */ function expand_radios($element) { if (count($element[options]) > 0) { @@ -861,10 +862,7 @@ function expand_checkboxes($element) { } foreach ($element[options] as $key => $choice) { if (!isset($element[$key])) { - $element[$key] = array( - type => 'checkbox', processed => TRUE, title => $choice, tree => TRUE, - value => in_array($key, $value), attributes => $element[attributes] - ); + $element[$key] = array(type => 'checkbox', processed => TRUE, title => $choice, tree => TRUE, default_value => in_array($key, $value), attributes => $element[attributes]); } } } -- cgit v1.2.3