Hi. I'm using CCK 6.x-2.0-rc6 and I noticed that whenever I add a new field to a content type it's label is not showing up on the create content page. E.g. I add a field with the label set to "Price", then on the create new content page for that content type the label "Prize" doesn't show up, it only shows the input box for the value. Anyone knows if I'm doing something wrong or that this is an issue/bug with this version of CCK?

Any help would be very much appreciated.

Thanks,
Luke

Comments

tmai’s picture

I have the same problem and could not resolve it around the field except I put my hand html code into it. Any one know to print the label automatically?
Thuan

arpieb’s picture

I'm running D6.13 with CCK 6.x-2.4, and tried installing the "example field" module from http://www.lullabot.com/articles/creating-custom-cck-fields so I could use it as a template for a new field type, and am having the exact same problem. Has anyone else run into this before?

----------
"Nothing is impossible - it just hasn't been done yet."

arpieb’s picture

Someone anonymously posted the fix on the Lullabot page:

That's because there is no ['#title'] property set in the widget form. You need to set it yourself. Here is an example:

$element['value'] = array(
    '#type' => 'textfield',
    '#title' => check_plain($field['widget']['label']),
    '#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL,
    '#size' => !empty($field['widget']['size']) ? $field['widget']['size'] : 60,
  );

There is also a nice bit of info following this post on that page regarding exploring the function params via the Devel module.

----------
"Nothing is impossible - it just hasn't been done yet."