How would I grab a list of all the fields in a content type? Currently, I'm using entity_metadata_wrapper() to grab each field individually, but I feel that there's probably a more efficient way to get all of the values for a given content type.


You can use the field_info_instances to get a list of all fields for a specific entity / bundle. In your case the entity would be 'node' and the bundle will be your content type.

  • This is correct. I just found it out myself shortly after asking. – Jack Ryan Jan 29 '14 at 16:23

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.