8 function custom_field_create_example() {
10 'custom_group_id' => 1,
11 'name' => 'test_date',
12 'label' => 'test_date',
13 'html_type' => 'Select Date',
14 'data_type' => 'Date',
15 'default_value' => '20071212',
23 require_once 'api/api.php';
24 $result = civicrm_api('custom_field', 'create', $params);
30 * Function returns array of result expected from previous function
32 function custom_field_create_expectedresult() {
34 $expectedResult = array(
42 'custom_group_id' => '1',
43 'name' => 'test_date',
44 'label' => 'test_date',
45 'data_type' => 'Date',
46 'html_type' => 'Select Date',
47 'default_value' => '20071212',
50 'is_search_range' => 0,
59 'options_per_line' => '',
61 'start_date_years' => '',
62 'end_date_years' => '',
67 'column_name' => 'test_date_1',
68 'option_group_id' => '',
73 return $expectedResult;
80 * This example has been generated from the API test suite. The test that created it is called
82 * You can see the outcome of the API tests at
83 * http://tests.dev.civicrm.org/trunk/results-api_v3
84 * and review the wiki at
85 * http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+Public+APIs
86 * Read more about testing here
87 * http://wiki.civicrm.org/confluence/display/CRM/Testing