diff --git a/core/includes/form.inc b/core/includes/form.inc index eee8be1..2009794 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -3337,16 +3351,29 @@ function theme_container($variables) { * * An example of per-row options: * @code - * $options = array(); - * $options[0]['title'] = "A red row" - * $options[0]['#attributes'] = array ('class' => array('red-row')); - * $options[1]['title'] = "A blue row" - * $options[1]['#attributes'] = array ('class' => array('blue-row')); - * - * $form['myselector'] = array ( - * '#type' => 'tableselect', - * '#title' => 'My Selector' - * '#options' => $options, + * $options[0] = array ( + * 'object' => 'Treacle', + * 'colour' => 'brown', + * '#attributes' => array ('class' => array('brown-row')), + * ); + * + * $options[1] = array ( + * 'object' => 'Corkscrew', + * 'colour' => 'silver', + * '#attributes' => array ('class' => array('silver-row')), + * ); + * + * $header = array( + * 'object' => t('Object'), + * 'colour' => t('Colour'), + * ); + * + * $form['table'] = array ( + * '#type' => 'tableselect', + * '#title' => 'Table Select', + * '#header' => $header, + * '#options' => $options, + * '#empty' => 'Nothing to show', * ); * @endcode *