function profile_getfields_example(){
$params = array(
'action' => 'submit',
- 'profile_id' => 25,
+ 'profile_id' => 27,
);
try{
'count' => 9,
'values' => array(
'first_name' => array(
+ 'api.required' => '1',
+ 'title' => 'First Name',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'contact',
'name' => 'first_name',
'type' => 2,
- 'title' => 'First Name',
'maxlength' => 64,
'size' => 30,
'import' => true,
'headerPattern' => '/^first|(f(irst\s)?name)$/i',
'dataPattern' => '/^\w+$/',
'export' => true,
+ 'api.aliases' => array(),
),
'last_name' => array(
+ 'api.required' => '1',
+ 'title' => 'Last Name',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'contact',
'name' => 'last_name',
'type' => 2,
- 'title' => 'Last Name',
'maxlength' => 64,
'size' => 30,
'import' => true,
'headerPattern' => '/^last|(l(ast\s)?name)$/i',
'dataPattern' => '/^\w+(\s\w+)?+$/',
'export' => true,
+ 'api.aliases' => array(),
),
- 'email' => array(
+ 'email-primary' => array(
+ 'api.required' => 1,
+ 'title' => 'Email',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'email',
+ 'api.aliases' => array(
+ '0' => 'email-Primary',
+ ),
'name' => 'email',
'type' => 2,
- 'title' => 'Email',
- 'maxlength' => 64,
+ 'maxlength' => 254,
'size' => 20,
'import' => true,
'where' => 'civicrm_email.email',
'dataPattern' => '/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/',
'export' => true,
'rule' => 'email',
- 'api.required' => 1,
),
'phone-1-1' => array(
+ 'api.required' => 1,
+ 'title' => 'Phone',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'phone',
'name' => 'phone',
'type' => 2,
- 'title' => 'Phone',
'maxlength' => 32,
'size' => 20,
'import' => true,
'headerPattern' => '/phone/i',
'dataPattern' => '/^[\d\(\)\-\.\s]+$/',
'export' => true,
- 'api.required' => 1,
+ 'api.aliases' => array(),
),
'country-1' => array(
+ 'api.required' => '1',
+ 'title' => 'Country',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'address',
'name' => 'country_id',
'type' => 1,
- 'title' => 'Country',
'FKClassName' => 'CRM_Core_DAO_Country',
'pseudoconstant' => array(
'table' => 'civicrm_country',
'labelColumn' => 'name',
'nameColumn' => 'iso_code',
),
+ 'api.aliases' => array(),
),
'state_province-1' => array(
+ 'api.required' => '1',
+ 'title' => 'State',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'address',
'name' => 'state_province_id',
'type' => 1,
- 'title' => 'State',
'FKClassName' => 'CRM_Core_DAO_StateProvince',
'pseudoconstant' => array(
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'labelColumn' => 'name',
),
+ 'api.aliases' => array(),
),
'postal_code-1' => array(
+ 'api.required' => 0,
+ 'title' => 'Postal Code',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'address',
'name' => 'postal_code',
'type' => 2,
- 'title' => 'Postal Code',
'maxlength' => 12,
'size' => 12,
'import' => true,
'headerPattern' => '/postal|zip/i',
'dataPattern' => '/\d?\d{4}(-\d{4})?/',
'export' => true,
+ 'api.aliases' => array(),
),
'custom_1' => array(
+ 'api.required' => '1',
+ 'title' => 'first_name',
+ 'help_pre' => '',
+ 'help_post' => '',
+ 'entity' => 'contact',
'label' => '_addCustomFieldToProfile',
'groupTitle' => '_addCustomFie',
'data_type' => 'String',
'date_format' => '',
'time_format' => '',
'name' => 'custom_1',
+ 'type' => 2,
+ 'api.aliases' => array(),
),
'profile_id' => array(
'api.required' => true,