Hi,
I have a form where user can add unlimited tables in it, so have made it with unlimited feature with 'add another item' button. Now i want one extra text field to each table so that user can name/title each table he added. Is it possible?
Please go through the attachment which i have tried to put one field but could not post and get data.
Please Help me with this.
Thank you.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

er_d0s’s picture

Hey there, I had a similar problem and was having issues with using tablefield with field_collection so I whipped up a quick solution.

The patch attached here will add a "Table header" textbox to the table field. I can see this being a common use case when you want multiple tables, my solution coud definitely be improved on.

Cheers!

er_d0s’s picture

Now that I think about it, this could be a nice feature, I'd envisage it working like when you active "title" and "alt" on image fields with with image module.

My patch is kind of hackish, but if it's the kind of thing you guys would be interested to commit to the module I'd be happy to go through and do a more "proper" implementation... interested?

er_d0s’s picture

Added an upgrade thingy in case you already have table field instances defined on your site

YOU MUST RUN UPDATE.PHP!!!

er_d0s’s picture

Uploaded wrong patch in the last post, plz use this one

boboss’s picture

Issue summary: View changes

I've tried your patch but doesn't apply against 7.x.2.1
6 out of 7 hunks FAILED
is against some other version or what?

finally can you just upload .module and .install files?

lolandese’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Active » Needs work

The patch probably could use a reroll against the latest dev.

lolandese’s picture

Category: Task » Feature request
Priority: Major » Normal
lolandese’s picture

lolandese’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
philsward’s picture

Curious how this differs from the already available "Table Description"? Other than the Table Description being the caption tag as opposed to something else, it serves the same purpose from what I can tell.

lolandese’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#1251738: Allow ability to set table caption

I guess that at the time of the creation of the feature request the caption field was not available yet. Now that it is, indeed, it seems it serves the same purpose. Thus closing as being a duplicate of #1251738: Allow ability to set table caption.