Custom form from user registration form not showing new fields in D7 I am trying to build a new form from the user registration form and while the user reg parts are appearing the new fields are not. Any ideas? The code is below. I tried having the fields in the primary array level AND under the account parameter.

When the array prints out it shows the parameters are there. So I am having trouble figuring out why it is not working. I am used to doing this in Drupal 6. But in Drupal 7 it is not cooperating.

function custom_reg_company_registration() {
  return drupal_get_form('custom_reg_company_form');
}

function custom_reg_company_form($form, &amp;$form_state) {
  $form = user_register_form($form, $form_state);

  $form['company_name'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; 'Company Name',
    '#maxlength' =&gt; 60,
    '#description' =&gt; 'The name of your company.',
    '#required' =&gt; 1,
    '#attributes' =&gt; array(
      'class' =&gt; array(0 =&gt; 'company_name'),
    ),
    '#default_value' =&gt; '',
    '#access' =&gt; 1,
    '#weight' =&gt; -10,
  );

  $form['primary_phone'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; 'Primary Phone',
    '#maxlength' =&gt; 30,
    '#description' =&gt; 'The primary phone number for your company.',
    '#required' =&gt; 1,
    '#attributes' =&gt; array(
      'class' =&gt; array(0 =&gt; 'primary_phone'),
    ),
    '#default_value' =&gt; '',
    '#access' =&gt; 1,
    '#weight' =&gt; -10,
  );

  $form['secondary_phone'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; 'Secondary Phone',
    '#maxlength' =&gt; 30,
    '#description' =&gt; 'The secondary phone number for your company.',
    '#required' =&gt; 0,
    '#attributes' =&gt; array(
      'class' =&gt; array(0 =&gt; 'secondary_phone'),
    ),
    '#default_value' =&gt; '',
    '#access' =&gt; 1,
    '#weight' =&gt; -10,
  );

  $form['company_type'] = array(
    '#type' =&gt; 'radios',
    '#title' =&gt; 'Company Type',
    '#maxlength' =&gt; 30,
    '#description' =&gt; 'The type of company you are setting up.',
    '#required' =&gt; 1,
    '#default_value' =&gt; 0,
    '#weight' =&gt; -10,
    '#options' =&gt; array(
      0 =&gt; 'Carrier',
      1 =&gt; 'Broker &amp; FF',
      2 =&gt; 'Shipper',
    ),
  );

  $form['#action'] = url('register/company');

  echo "&lt;pre&gt;" . print_r($form, true) . "&lt;/pre&gt;";

  return $form;
}
Is there a reason you need to use code? You could just add the fields to the user profile and check "required on registration" to make them show up during registration.