drupal cck api: how to retrieve field-type for a particular cck field
Suppose I have a field nam开发者_如何学Ced 'field_myimage'. Does cck have an api function that will allow me to retrieve the field-type (eg 'filefield') and widget (eg 'image upload') associated with this fieldname?
Thanks for your help.
foreach(content_fields() AS $field => $info){
drupal_set_message("$field : ". $info['module']);
}
or you can retrieve info by other way:
$field = content_database_info(content_fields('field_myfield'));
精彩评论