1

what happened the ability to add PHP to the default value of a CCK field? Also, is it possible to set a CCK field to 'greyed out' or disabled by default? I don't need users editing this ref # field but I need admins to search it.

1 Answer 1

1

Drupal 7 is a lot different than Drupal 6 in many ways. What used to be called CCK, now called "fields in core" or "fields" is also different. Not all of the features that was in CCK is available in Drupal 7 fields, some are, but contrib modules is needed.

Regarding using PHP default values, I don't know of a module that does this. It's possible with hook_form_alter in a custom module, but this might not be what you are looking for.

I don't know of any way to gray out fields when editing an entity, other than again using hook_form_alter. The field permissions module might be able to help you, to deny users the ability to edit the field. It would then disappear entirely, but that could be a possible solution.

1
  • That's great... thanks for replying. I guess I was more curious as to whether I would have to use hook_form_alter or not!
    – emc
    Commented Jan 27, 2012 at 19:36

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.