I have set up 2 different content profile type for user. each of them has different cck fields,also by using the 'auto assign role' I have set up 2 different url for the 2 different user registration,

I have choose to display some field in the registration page . the problem is : the fields from both content type are display together in the registration page no matter which registration url is . I need to display the field only for its own url page, url A only display the field for the A content type , url B only display the field for the B content type.

Anybody can tell me how can I do this ? Thank you.

Comments

visuallemon’s picture

Im facing same problem

jax_rox’s picture

i'd also like to know how to do this

gewillson’s picture

Be sure to access the registration page when logged in as one of the 2 roles and not as an admin user. Because admin has authorization to see all fields.

hanmant.sapkal’s picture

Hi friends, the same case with me too! How to get url specific profile fields on registration page? I cant use cck field permission, because at the time of sign up, both type of users (say student and teacher) are anonymous users. Somebodies help is really add value to my work and contribute things to our forum.

weri’s picture

Subscribe

stefan81’s picture

subscribe

j4’s picture

Hanmant,

Any luck? Am facing the same problem..

Jaya

hanmant.sapkal’s picture

Hi Jaya,

We can do it. I did with following senario.

-> create content-profile with all fields [i.e. UNION of profile fields from all kind of users]
-> enable content-profile to show on 'registration'
-> set permissions on the fields through 'permissions'. If we want a field accessible at sign-up, set its access to anonymous. and if it want to be displayed after sign-up then set its access to specified role, for which it is intended.
-> If we want to hide a field from signup page but want to accessible after signup, then go to the content profile and check as 'Hide form field'.
-> again, at hook_form_alter we can control the accessibility of the field as $form['field_profile_marital_status']['#access']=false;
here we can check the url from arg() and predict the kind of user who is intended for signup
-> also under hook_nodeapi ($op='view') we can unset the field if we dont want that field for specific user as unset($node->content['group_languages']);

Thats it!

j4’s picture

Hi Hanmant,

Thank you for the detailed reply. Had decided to do away without the need to see the profile fields before signup, but will surely test this out.

Warm regards
Jaya

ubdr’s picture

Hi hanmant.sapkal ,
How can I create a content-profile . I have enabled the content-profile module, but i did not see any links to create a content-profile.

Thanks,

ubzub

hanmant.sapkal’s picture

Hey ubzub (I am not sure why people use usernames as "ubzup", anyways....)

If you say which version of drupal and content-profile you are using, then it will add value to discuss the solution. Next time be sure to post background details. I guess you are using drupal 6.x.

After enabling content-profile module

* There will be a new content type "profile". Customize its settings at
admin/content/types.
* At the bottom of each content type edit form, there is a checkbox, which allows
you to mark a content type as profile.
* When you edit a profile content type there will be a further tab "Content profile",
which provides content profile specific settings.

Hope it will initiate your move!

onejam’s picture

Once you created an Auto assign role path for a given role in the Auto assign role settings page, this will appear under content profile setting page called 'Use on Auto Assign Role paths:' If you check this box it will use the content type for the assigned role. Make sure on the other content profile (for authenticated user), you have this unchecked.

The key thing here is that you do not select 'Use on Registration' for the content profile you setup to use for your custom role. Leave 'Use on Registration' checked only for the content profile used for your authenticated user.

Works with the following setup:
Drupal 6.20
Auto Assign role 6.x-2.0-beta1
Content Profile 6.x-1.0

Shinzon’s picture

Is this posible to do as admin? I want as admin to have 2 different add user url.
I have two different profiles (Teacher and Student) and i want to be able as admin to add Teacher on one form and Student on another form.

So is it possible to have different add user (not registration) url that are showing different fields and adding different roles as admin?