Download & Extend

Allow 'Insert Row' or 'Insert Column'?

Project:TableField
Version:6.x-1.0-beta2
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Is there any way that you could have a funcationality for inserting a row or column mid-table? Say, for instance, someone needs to add a row after the 2nd row - right now, you would have to re-type the entire table after the 2nd row, adding in the new row manually.

Comments

#1

Yes, an Add Row or Add Column feature would be nice:
http://plugins.jquery.com/project/tableAddRow

Perhaps not mid table, but at least at the end of the table instead of rebuilding the entire table.

Here is live demo (this adds rows at the end of table)
http://cloudgen.w0ng.hk/jquery/table.addrow.php

#2

Another possible Drupal solution

http://drupal.org/project/multicrud

#3

Yeah, those are both really interesting. I'm on vacation this week, but I'll try to do some toying around next week.

Thanks for the links!

#4

As the author of multicrud, I would like to warn about using it for the CCK table field module.

multicrud is aimed at situations where the table rows have a predefined structure. You can add table rows dynamically, but not table columns. Any further specialization of multicrud will be aimed at crud-like use cases, as described on the module page. The strong specialization allows to keep the "delete" checkbox and the mechanics for row adding and field renaming and validation hardcoded.

The other thing is that multicrud will probably change a lot before it leaves alpha status, and the API can not be considered stable yet. This should not stop you from toying around with it, but it should be kept in mind when adding it as a dependency.

That said, you can feel free to study the multicrud module, and copy some ideas, if that helps.