According to the documentation (https://wiki.civicrm.org/confluence/display/CRMDOC/Pseudoconstant+(option+list)+Reference) I should be able to pass a context to an api.getoptions call in order retrieve both enabled and disabled options for a field. However, it doesn't seem to be working. In fact, swapping out different contexts has no apparent effect on what is returned by the api call. Am I missing something?

Sample code:

$opts = civicrm_api3('contribution', 'getoptions', array(
  'field' => "custom_5",
  'context' => 'get'

1 Answer 1


Looks like you found a bug. Here is a fix:


Could you please review it and leave feedback on github to speed along the merge process?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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