What properties does a custom cck_phone form field need to work? I am struggling to get a working custom implementation of a cck_phone field from the cck_phone module. I have included my partially working code at the bottom. 

What seems to be not working is that the function cck_phone_phone_number_process expects to be able to retrieve information about the widget with 

$instance = field_widget_instance($element, $form_state);
$settings = $instance['settings'];

However in my implementation, field_widget_instance($element, $form_state) returns NULL, resulting in both $instance and $settings being NULL and problems further on in the cck_phone_phone_number_process function.

What does work is that the code below does render a properly populated country code dropdown and phone number entry textfield.

My code to create the custom cck_phone field:

$form_section['phone']['field_phone_home'] = array(
    '#type' =&gt; 'phone_number',
    '#field_parents' =&gt; array(
        'profile_personal_information'
    ),
    '#field_name' =&gt; 'field_phone_home',
    '#language' =&gt; 'und',
    '#delta' =&gt; 0,
);
I was unable to find an exact answer to this question, but I was able to find a work around to get the extensions to load.

using form_alter, after the field is partially built in a form function

//set value for office extension
  if(
    isset($form_state['storage']['$profiles']['personal_information']-&gt;field_phone_office[LANGUAGE_NONE])
    &amp;&amp;
    $form_state['storage']['$profiles']['personal_information']-&gt;field_phone_office[LANGUAGE_NONE][0]['extension'] != NULL
  ){
    $field_phone_office_ext_value = $form_state['storage']['$profiles']['personal_information']-&gt;field_phone_office[LANGUAGE_NONE][0]['extension'];
  }
  else{
    $field_phone_office_ext_value = '';
  }

  $form['user-information']['user-information-fieldset']['profile']['phone']['field_phone_office']['extension'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Ext.'),
    '#default_value' =&gt; $field_phone_office_ext_value,
    '#value' =&gt; $field_phone_office_ext_value,
    '#size' =&gt; 10,
    '#maxlength' =&gt; 10,
    '#weight' =&gt; 2,
    '#attributes' =&gt; array(
      'class' =&gt; array(
        'phone-extension'
      )
    )
  );