Created
February 18, 2016 14:11
Revisions
-
com2 created this gist
Feb 18, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ function myextension_civicrm_customFieldOptions ($fieldID, &$options, $detailedFormat ) { if ( $fieldID == 51 || $fieldID == 52 || $fieldID == 53 ) { $result = civicrm_api3('OptionValue', 'get', array( 'return' => "label,name,value", 'option_group_id' => "languages", 'is_active' => 1, 'options' => array('sort' => "weight", 'limit' => 0), )); $detailed_options=$result['values']; if (isset($detailed_options) && !$detailedFormat ) { foreach ($detailed_options AS $key => $choice) { $options[$choice['value']] = $choice['label']; } } else { $options += $detailed_options; } } }