Hi, im trying to add some node fields into the user registration form, namely the fields from the node_profile module.

One of the fields is a node-reference select list which works fine in the node/add/profile page.

but when i try to add it into the user_register form it has all the form elements except the options for the select list.

has anyone else ever come accross something like this?

function activation_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
  case 'user_register':
    module_load_include('inc', 'content', 'includes/content.node_form');
    $content_fields = content_types('profile');
    $form += (array) content_field_form($form, $form_state, $content_fields['fields']['field_profile_version']);
    break;
  }
}

I appreciate any and all ideas.

Comments

ram_segal’s picture

Hey,

I worked with profile module, when i add a new field i have an option to make it visible in registration form.
Maybe node profile has this option also, so u don't have to add them yourself, or maybe think about using profile module if it answers your needs.

nicksanta’s picture

eww, yeah - i'm actually migrating from the profile module. that is a smelly module.

It is convenient having that option, im currently investigating that possibility in content_profile.

cheers for the reply!

----------------------
Nick Santamaria