Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a pretty ordinary tableselect element that looks like so

$form['registration_table'] = array(
    '#type' => 'tableselect',
    '#header' => $header,
    '#options' => $enrollment_options,
    '#js_select' => FALSE,
    '#multiple' => TRUE,

What I would like is to be able to use the empty space which is reserved for the "select all" checkbox for a text label. I would like to indicate by the label what action the checkboxes represent. In this case they represent selecting a course to register for so I would like to add the label "Register" there. Any advice on how to do this?

share|improve this question

For doing this you have to change the "theme_tableselect" core code. See this documentation code part. If you do not set "select all" then the header is assigned to null

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.