I want to create 3 profiles, type 1, 2 and 3. I want users to be able to switch from one type to another (based on roles). All three types have the same fields as type 1. Type 2 has a few more extra fields than type 1 and type 3 has a few more fields than type 2. Can these profiles share data? If the field "name" is in all three types, how do I share this field of data between all the types so that the user does not have to input the same data for each profile type?

Comments

joachim’s picture

Status: Active » Fixed

You probably can't -- or rather, if you could, you'd need to do some tinkering inside FieldAPI, not Profile.

The way I imagine this ought to be done is by having either some profile types only available to certain roles by setting permissions, or by having role access to individual fields.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bartezz’s picture

Was looking for similar functionality. Instead of using profile2 I started working with http://drupal.org/project/field_permissions

This way you basically have 1 profile setup but only allow certain roles to use certain fields so you can for instance have the field surname for every role.

Cheers

WebmistressM’s picture

I too would like to have this functionality. My members get access to certain profile fields depending on what membership they are on. When they get granted a membership of a certain type, a certain role is given to them. Essentially, I need to find a way for users to upgrade/downgrade membership (and thus, get re-assigned the role that corresponds to a profile type), but without losing any data that they may have entered in for the previous membershp types which they were assigned to.

So, if user A has a profile type that has these fields:

Name:
Birthday:
Interests:

...but then upgrades to a higher membership, with the following profile type fields

Name:
Birthday:
Interests:
Skype Name:
Website Link:

than essentially user A should have the first 3 fields already filled out. Its only the Skype Name and Website Link which would be blank when they go to update their profile after that membership change.

Any suggestions? There is no problem with creating a profile type with the fields for the highest tier user, cloning that profile type and removing whatever fields arent allowed to be created/edited for the next tier down. However, I think it would be a pain in the butt for the user to have to constantly re-enter any info when/if they change memberships. :/

bartezz’s picture

Hi WebmistressM,

If I recall correctly I just created all the fields I needed for all 'profile types' under the default profile. This would make all fields available to your user A which you don't want. So I installed the field permissions module. With this module I changed the permissions for the 'skype name' and 'website link' so that only a premium-role user can edit or even view these fields... that's it basically.

Hope this helps!

Cheers,
Bartezz

WebmistressM’s picture

Im not sure what you mean by a default profile. I dont have such a one, or at least I dont at this point. I do think that Profile2 had an "out of the box" profile type when the module was first installed but I dont think I have that one any longer.