By nyantarou on
Hi,
I'm working with Content Profile and trying to add an additional global setting for when you create a new field under the Profile content type (like maximum length is. Let's call it 'priority'). I'm wondering what the best way would be for a module to add the setting to fields, instead of having to create new field types and using hook_field_settings.
Thanks
Comments
Not really. Those settings,
Not really. Those settings, and their data, are maintained individually by the modules handling the fields. You could hook_form_alter() the settings form, and carefully only alter the forms that "matter" for what you're doing... then hook_form_alter() in some additional validation/checking code when the real node form is built.
Beyond that, though, there's no real way to change the underlying behavior of a whole range of CCK fields.
mefi represent!
--
Eaton — Partner at Autogram
Added own fields in CCK General settings
Hello All,
I got the solution for Drupal 6. hook_form_alter is used to add the form api field into cck general settings, as follows :
If you want to store the field value in cck table then you will refer some funcitons like hook_schema_alter, db_add_field, db_drop_alter, we need to put these functions in modulename.install file. sample code as follows