Hello!

If you can make a table without fixed lines. I thinked a "+" button under the table, and it add a new line with ajax if you want, like CCK multi fields. The module can count rows with sequented integers. Its an complicated problem, but it looks like usefull.

Bye!

Comments

lazly’s picture

Title: Dynamicline number » Dynamic line number
attiks’s picture

Status: Active » Closed (won't fix)

This is complicated indeed, and AFAIK webform doesn't support this. Our module uses the options as row headers, so allowing visitors to add rows means we have to create new options on the fly and for each visitor. This means that the submission, table, csv views will need support for this as well and frankly I don't see it happen.

If you have an idea on how to solve this without breaking any other functionality, I'm open for suggestions ;p

lazly’s picture

Yes, its hard patch, this is only an idea. :)
This module use serialize array object for store submitted records. We can use different line number in this array / submitting.

function _table_element_expand($element) {
  $rows = $element['#rows'];
  //...
  foreach ($rows as $rowkey => $val) {
  //...

Here rows object can will be dynamic length when load table, after when use it we need "just" an tricky ajax function. When record submitted table need while() not foreach().

achrelam’s picture

+1 !