I have created a list field with 10 items(allowed values). Now I want to get that 10 items programmatically. How do I get them?

1 Answer 1


Better create a vocabulary of taxonomy terms populated with your items.Then you can use taxonomy_get_tree() function to retrieve all those items

  • I can't change the field. There are many submitted nodes having this field.
    – Nima
    Jun 27, 2012 at 12:13
  • The data is on the field_config table. Identify the row by checking the value given for that select list from field_config.field_name column and use sql like this "select field_config.data from field_config WHERE id =field_config.id value". The allowed values will be the array ['settings']['allowed_values']
    – user7282
    Jun 27, 2012 at 13:01
  • 4
    There's a working function implemented here that does the same thing
    – Clive
    Jun 27, 2012 at 13:06

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.