I have a Content Type, which has field collection and I need to load the fields present inside the field collection, Any idea on how to do this?

Very Important Note: There is no content created for this Content Type as yet.


This'll do it:

$entity_type = 'field_collection_item';
$bundle_name = 'field_profile_address';

$info = field_info_instances($entity_type, $bundle_name);

// $info at this point is an array of fields attached to the queried bundle.

From your last 2 questions I think you'd be very interested in the Field Info API docs.

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.