Is there a CCK field that is basically a simple label field (non-editable text) that is shown when the form is created (field is filled in before the form is rendered), is submitted along with the form, and is not shown when viewing the node? I thought I saw something like this a few days ago, but cannot seem to locate it now.

Comments

Drupalace-1’s picture

I'm reading that as 1) adding a new field to any node type, via CCK; and then 2) via CSS (or some other method provided by Drupal?), making that field invisible in output.

Is that what you're looking to do?

--------
A site by, of, and for the Drupal newbie: http://www.drupalace.com

mscdex’s picture

No, this would be a cck field that is essentially a non-editable label used for informational purposes that shows up on a node creation/edit/update form, but not on the display of the node itself. Ideally, the contents of the label would be generated once (by way of php code during the render of the node creation form) and then stored into the database after a successful submission.

I hope that makes more sense.

Drupalace-1’s picture

Hmm, sounds like something you'd place into the description of a content type.

Administer » Content management » Content types » (target content type)

There's a field for Description, which sounds like what you describe. You could replace the text there with your non-editable informational label, or add such a label to the text there.

Does that work?

--------
A site by, of, and for the Drupal newbie: http://www.drupalace.com

wentingm’s picture

No, it is not for the description field. It is a CCK field that when a user create/edit a type of a customized content, he/she can only view it without being able to edit it. For example, we have a CCK field named tomato. The text box below it is a description. This description is read-only. Do you know how to create it under CCK module?

Drupalace-1’s picture

Sorry, I'll have to refer this to someone wiser; it's not ringing a bell with me. : (

--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com