CRM-13234 add default value to data available via api.getfields
authoreileen <eileen@fuzion.co.nz>
Tue, 20 Aug 2013 04:50:47 +0000 (16:50 +1200)
committereileen <eileen@fuzion.co.nz>
Tue, 20 Aug 2013 04:50:47 +0000 (16:50 +1200)
CRM/Core/BAO/CustomField.php

index 84ea3db21b3757dbe105f92694686aa2a68a7445..ea5cc53c44427a62b1585ca48a48b7745eb73a0b 100644 (file)
@@ -490,7 +490,9 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
 
         $query = "SELECT $cfTable.id, $cfTable.label,
                             $cgTable.title,
-                            $cfTable.data_type, $cfTable.html_type,
+                            $cfTable.data_type,
+                            $cfTable.html_type,
+                            $cfTable.default_value,
                             $cfTable.options_per_line, $cfTable.text_length,
                             $cfTable.custom_group_id,
                             $cgTable.extends, $cfTable.is_search_range,
@@ -554,6 +556,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
           $fields[$dao->id]['groupTitle'] = $dao->title;
           $fields[$dao->id]['data_type'] = $dao->data_type;
           $fields[$dao->id]['html_type'] = $dao->html_type;
+          $fields[$dao->id]['default_value'] = $dao->default_value;
           $fields[$dao->id]['text_length'] = $dao->text_length;
           $fields[$dao->id]['options_per_line'] = $dao->options_per_line;
           $fields[$dao->id]['custom_group_id'] = $dao->custom_group_id;