diff options
-rw-r--r-- | includes/form.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc index 5cfbcfad2..e4831d88e 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2225,6 +2225,8 @@ function form_process_tableselect($element) { $element['#default_value'] = array(); } + // Sort the options by their #weight if they have a #weight. + uasort($element['#options'], 'element_sort'); // Create a checkbox or radio for each item in #options in such a way that // the value of the tableselect element behaves as if it had been of type // checkboxes or radios. |