For one of our clients we needed the tablefield module to correctly handle complex tables with configurable multiple headings, rowspans, colspans, ... All this functionality needed to be WCAG 2.0 compliant so that screenreaders could also correctly read the tables.

I would like to give our work back to the community and I hope that our work can find it's way back to the module.

List of changes we made:
+ default input for cells is textarea and newline character is converted to
+ each row and each column can be marked as a row/column header via a checkbox
+ html output of the table has been completely rewritten according to the WCAG 2.0 standards
+ various css-classes have been added to the cells to allow for better design-control over headings, cells, ...
+ textarea to provide colspans
+ textarea to provide rowspans

I have writte extensive comments in the code where I think it was needed.

This patch was made against 6.2.1 version of tablefield module.

Any feedback is more then welcome and I'll try and incorporate it in the patch.

CommentFileSizeAuthor
#3 tablefield-1094568.patch31.94 KBweseze
wcag2.0.patch26.61 KBweseze
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kevin Hankens’s picture

Wow, sounds very cool. I'll try to take a look soon and see how much I can integrate.

Thanks!!

avr’s picture

Love the idea of being able to add colspans & rowspans - almost makes me want to jump back to 6 for this freshly started project.

weseze’s picture

FileSize
31.94 KB

We've made a new patch with some minor fixes and a few new features.
AHAH callbacks to rebuild tables (no more page refreshes needed)
Our internal goal was to use the tablefield module to input tabledata and render it in Drupal according to WCAG2.0 spec. We absolutely did not want the module to turn into a spreadsheet like plugin. We therefore developed a very simple CSV export function so our client could export data, edit it (inverting, transposing, inserting rows cols, ...) and then import it again.
We have also changed to sql storage for datatables to longtext because a normal textfield fills up very fast...

Patch is against 6.2.1 and also includes all the previous features.

loparr’s picture

Hi,
After applying this patch I get following error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL' at line 1 query: ALTER TABLE content_type_product ADD `field_table_value` DEFAULT NULL in .../sub/test/includes/database.mysql-common.inc on line 306.

DanielJohnston’s picture

Status: Needs review » Needs work

Seconding comment at #4. Looked like it was working fine at first, but messed up node editing and saving of field data in any node where it was active with a SQL syntax error. Haven't checked if node creation also causes errors, but it clearly needs work.

Liam Morland’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 6 is no longer supported. If this issue still exists in later versions, please re-open and update the version.