Anyone else having trouble hiding labels on CCK fields? I've tried to hide them on /admin/content/node-type/page/display, but that didn't work. I've also created a hook_form_alter module to try achieve the same thing but that did not work either ($form['field_name']['#title'] = '')
I've tried this on different types oc CCK-fields - numbers, text, etc.

It works on the regular Title field and taxonomy field though.

Comments

DrupalNovice’s picture

Category: bug » task

Please ignore my dumb attempt to try to hide labels on the form using the options on /admin/content/node-type/page/display - they're meant for the node rendering itself.

I am having difficulties hiding the form labels though - regular form items that are created by the system module can easily be hidden through the _form_alter hook, but I am unable to achieve the same effect on the CCK fields.

Any ideas on this?

DrupalNovice’s picture

Status: Active » Fixed

And the answer is: Use the following in your _form_alter hook: $form['field_name'][0]['#title'] = '';

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.