get_field_options

For a given field, return all the available keywords (nodes) or selectable options.

Param1 $ref The ID or shortname of the field
Param2 $nodeinfo (Version 8.6 +) Provides extended field option information if set to TRUE.
Default FALSE

Return values

A list of the options for the field, for example, for a country field this would be a list of countries.

If $nodeinfo is TRUE, each field will return

  • ref - The unique id of the field option
  • name' - The translated text of the option
  • parent - The parent option ID (used by category tree fields)
  • order_by - used to determine rendering order