I have to display only new created profile2 field on separate registration page. without core user registration field.

Comments

prakashrajavel’s picture

Issue summary: View changes
zmove’s picture

Bump this issue. I don't want to add the core fields, but be able to control them in profile2 manage fields. I think if core user fields were embed on profile2 manage fields system, you and me could do what they want.

(Personnaly I want to create a multistep registration form using fieldgroup, but the fact that core user fields are not in profile2 manage fields system block me).

spleshka’s picture

Status: Needs review » Active

Guys, can you please explain your idea more clear? I would love to help, but I don't get what exactly do you want to have.

zmove’s picture

Hello,

In fact, this small request bump a major issue of profile2 integration with the user register form.

Actually, when you create a profile2 entity and put it on the user registration form you have to manage 2 forms :

  • The core user form (admin/config/people/accounts/fields)
  • The profile2 form (admin/structure/profiles/manage/profile_type/fields

So the first problem is that you cannot manage the display how you want. For example, you can't group the user register fields with others profile2 fields using fieldgroup module because of that.

But that's not all, when you examine the $form array in the register form you can see that all profile2 fields are grouped into an array. Because of that, most form validation module will not work with profile2 on registration form if they not implement special conditions for profile2 (one example).

To avoid all that problems, I think that profile2 should emulate all the core user fields (it's fields after all, should not be too complex to get them in profile2) to create a centralized setting page (under admin/structure/profiles/manage/profile_type/fields) and remove that array containing all the profile fields to put them directly in the $form array.

By doing that you will make all modules related to fields, form validation etc... compatible with profile2 as the form generated with it will not be different from others.

prakashrajavel’s picture

Spleshka thanks for your reply. actually what i meaning i want to display profile2 field only on my registration page.. but now profile2 field come with drupal core user log email& password filed? is its possible to display only profile2 field on registration page.

gskharmujai’s picture

i think that we can display only profile 2 fields using a custom user registration template and show only the relevant profile 2 fields there.

However the catch here is that, since drupal core fields will be mandatory, we might need to unset the validation handlers for those using hook_form_alter()