Drupal 7のユーザー/登録ページでテキストフィールドを変更して追加したい。フォームが関数によって生成されることを知っていますuser_register_form()
この方法でテキストフィールドを追加できますか?
function bartik_copy_user_login($form, &$form_state) {
  global $user;
  // If we are already logged on, go to the user page instead.
  if ($user->uid) {
    drupal_goto('user/' . $user->uid);
  }
  // Display login form:
  $form['name'] = array('#type' => 'textfield',
    '#title' => t('Username'),
    '#size' => 60,
    '#maxlength' => USERNAME_MAX_LENGTH,
    '#required' => TRUE,
  );
  $form['name']['#description'] = t('Enter your @s username.', array('@s' => variable_get('site_name', 'Drupal')));
  $form['pass'] = array('#type' => 'password',
    '#title' => t('Password'),
    '#description' => t('Enter that accompanies your username.'),
    '#required' => TRUE,
  );
$form['address'] = array('#type' => 'textfield',
    '#title' => t('Your address'),
    '#size' => 60,
    '#maxlength' => 125,
    '#required' => TRUE,
  );
  $form['#validate'] = user_login_default_validators();
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Log in'));
  return $form;
}