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
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.
-
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!– emcCommented Jan 27, 2012 at 19:36