I'm looking for something like the 'textfield' CCK fieldtype, except instead of displaying a label and an edit box with a value - it would just display a label and a value as text during both edit and view operations.

So for example, as a textfield it might display like this: label: [value]

as a 'static' CCK fieldtype it would display like this: label: value

I've tried disabling a textfield, but our User Experince folks don't like the fact that the field has a box, but yet really never becomes editable.

Thanks for all your help, Greg

1 Answer 1


If I understand correctly, you don't need an input element at all. In this scenario, you can use hook_form_alter() or hook_form_FORM_ID_alter() in a custom module of site specific customizations to add a form element of type 'item':

$form['my_form_component'] = array(
  '#type' => 'item',
  '#title' => t('My Label'),
  '#markup' => t('This text follows the label'),
  '#description' => t('An optional description appearing below the markup'),

See the Forms API Reference for more details.

Edit: If you're not interested in custom modifications, the Markup module seems to provide this kind of utility in a contributed module for D6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.