6 function uf_field_create_example(){
8 'field_name' => 'phone',
9 'field_type' => 'Contact',
10 'visibility' => 'Public Pages and Listings',
12 'label' => 'Test Phone',
15 'location_type_id' => 1,
21 $result = civicrm_api( 'uf_field','create',$params );
27 * Function returns array of result expected from previous function
29 function uf_field_create_expectedresult(){
31 $expectedResult = array(
39 'uf_group_id' => '11',
40 'field_name' => 'phone',
47 'visibility' => 'Public Pages and Listings',
49 'is_searchable' => '1',
50 'location_type_id' => '1',
51 'phone_type_id' => '1',
52 'label' => 'Test Phone',
53 'field_type' => 'Contact',
55 'is_multi_summary' => '',
60 return $expectedResult ;
65 * This example has been generated from the API test suite. The test that created it is called
67 * testCreateUFField and can be found in
68 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/UFFieldTest.php
70 * You can see the outcome of the API tests at
71 * http://tests.dev.civicrm.org/trunk/results-api_v3
73 * To Learn about the API read
74 * http://book.civicrm.org/developer/current/techniques/api/
76 * and review the wiki at
77 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
79 * Read more about testing here
80 * http://wiki.civicrm.org/confluence/display/CRM/Testing
82 * API Standards documentation:
83 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards