2

I have to do some functionality with fields associated with a content type, this i have to do before creating content for it.

In custom module tried using node_type_load('digital_iq_2012'), this function loads content type details alone and not the fields associated.

Do we have a way to get the fields as well?

Any help?

2

You can use field_info_instances('node', $content_type).

With field_info_instances('node', 'article'), I get the following.

screenshot

| improve this answer | |
1

I guess field_read_fields will be nice : http://api.drupal.org/api/drupal/modules%21field%21field.crud.inc/function/field_read_fields/7

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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