Tables made with Tableselect class have a column containing a checkbox for every row. It should be possible to make the cell containing the checkbox have a rowspan attribute (and some following rows have no checkbox) so that one checkbox can apply to several rows.

As part of accomplishing this, it should probably be possible to add arbitrary attributes to the table cell containing the checkbox.

The current definition of #options:

An associative array where each key is the value returned when a user selects the radio button or checkbox, and each value is the row of table data.

I suggest that for any row of #options which is an array that includes the key data, the contents of data is taken to be the row of table data and any other keys are considered to be attributes on the cell containing the checkbox. As well, if this includes a rowspan attribute with a value greater than 1, then the cell containing the checkbox is omitted from the suitable number of following rows.

Comments

Liam Morland created an issue. See original summary.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.