Unlimited field default to 1 row

Events happening in the community are now at Drupal community events on www.drupal.org.
thomas4019's picture

Has anybody found out a good way to make a CCK field with an unlimited number of values to only show one empty field on creation/update instead of two. Is there a module out there to make it easy? Or what functions/hooks could I use to fix this with a custom module?

Thanks,

AttachmentSize
Capture.PNG2.43 KB

Comments

subscribe

scottprive's picture

subscribe

subscribe

feedbackloop's picture

subscribe

subscribe This is plaguing my

dang.artman's picture

subscribe

This is plaguing my new site I am currently working on as I am using a theming function to create a new tab for each text area field that is added. So I end up with multiple blank "pages" in my node display.

http://robotgeek.flpvp.com/tutorials/admin/tutorial-page-reordering

I believe it can be fixed for

thomas4019's picture

I believe it can be fixed for particular fields with a hook_form_alter but I haven't tried yet.

Thomas Hansen
www.ThomasHansen.me

Theming CCK2

drupalnesia's picture

Theming CCK2 http://drupal.org/node/601646 or using form_alter hook

I couldn't get the theming in

odegard's picture

I couldn't get the theming in drupal-id.com's link to work. Also it seems you need to apply the fix to each empty double-field by name.

Patch in #36 in this thread http://drupal.org/node/320313 fixes the problem for all instances on the form.

It's pretty old ... but maybe

anavrin's picture

It's pretty old ... but maybe somebody will be looking for this option ...
At least if You have a field collection - then when You edit it's properties You have an option called:

Hide blank items (in bottom part, just before the submit button) - and it does the trick ...

It's pretty old ... but maybe

anavrin's picture

It's pretty old ... but maybe somebody will be looking for this option ...
At least if You have a field collection - then when You edit it's properties You have an option called:

Hide blank items (in bottom part, just before the submit button) - and it does the trick ...

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: