0

can I collapse the field in my edit-content page in Drupal ?

For example, at the bottom of the page Revision Information, URL Path Settings, Authoring Information etc are collapsed.

I would like to have this functionality for the CCK Fields as well.

thanks

googletorp
  • 33,075
  • 15
  • 67
  • 82
aneuryzm
  • 63,052
  • 100
  • 273
  • 488

2 Answers2

1

You can do this with hook_form_alter by putting the fields into a fieldset the you make collapsible.

googletorp
  • 33,075
  • 15
  • 67
  • 82
0

You can also use the CCK Fieldgroup module to create a fieldgroup in the same interface you create new fields. Go to the fieldgroup settings page to make it collapsed by default. Then drag-n-drop fields to be under a given fieldgroup.

Fieldgroup is part of the CCK project, just turn it on in the modules page.

Using hook_form_alter() is a cleaner solution but technically a bit more difficult.

Grayside
  • 4,144
  • 21
  • 25
  • So what you suggest, is to use the field group as wrapper, and add the item inside it so I can collapse it. – aneuryzm Apr 20 '10 at 13:22
  • The CCK Fieldgroup is essentially a GUI version of using hook_form_alter(). A fieldgroup is manifested in the Forms API as a fieldset, and the collapsed fieldset properties from the Fieldgroup configuration are pushed into the fieldset definition as well. – Grayside Apr 22 '10 at 05:39