i don't know why, buy all the fields from profile2 are visible on registration form.

so, as i remember, there was a checkbox to change this benaviour.

but i can't found it.

looking in the code, exists:

  $form['data']['#tree'] = TRUE;
  $form['data']['registration'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show during user account registration.'),
    '#default_value' => !empty($profile_type->data['registration']),
  );

but it's not displayed in profile edit page!!!

CommentFileSizeAuthor
Snap4.jpg71.24 KBdgastudio

Comments

dgastudio’s picture

Project: Profile 2 » Profile2 Registration Path

ok, updating. i have disabled and uninstalled both modules (profile2 and profile2 registration path).

first, enable profile2 and profile2 pages

everything seems working fine.

after enable, profile2 registration path, all the fields from my custom profile are displayed on registration page. and i don't know how to remove them from there.

help?!

dgastudio’s picture

as i have found, this function is executed every time on show registration form.

      // Trigger Profile2 to attach fields from profile defined in $form_state.
      profile2_attach_form($form, $form_state);
      $misc = unserialize($profile_types[$key]->misc);
      if ($misc['fieldset_wrap']) {
        // Wrap each profile form in a fieldset.
        $form['profile_' . $type_name] += array(
          '#type' => 'fieldset',
          '#title' => check_plain($profile_type->label),
        );
      }

so, this is becouse the fields are displayed

grasmash’s picture

Kervi,

I think I understand the issue that you're experience, but I'm have a bit of trouble understanding your last post.

From your screenshot, it does appear that your settings are correct. However, I'm unable to reproduce your issue.

I've just made a number of bug fixes to the dev version please update and try it again.

Let me know if you have any success.

mnlund’s picture

I think what kervi means is that all the fields available for the profile type is showing upon registration, when often only some of the fields should be filled out during registration. Other fields should be available when the user edits the account.

jaxpax’s picture

I'm experiencing the same thing. I don't want to expose any of the fields during registration.

grasmash’s picture

@jaxpax. If you don't want to expose any profile fields during registration, why are you using a unique registration path? Just to apply user roles?

dgastudio’s picture

Yes!

grasmash’s picture

Hm. I hadn't imagined using this module to create registration paths without actually using any Profile2 fields. The module is definitely intended to be Profile2-centric.

I'm considering forking this project into a new Registration Options module that would offer a number of the features here, including registration blocks, role assignment, multi-step registration, etc., but that's probably not going to happen soon.

I suppose the easiest option for now is to add a new 'attach profile fields' checkbox to the Profile2 profile edit page. This would allow you to create a registration path without actually attaching the fields. Beyond that, I may add a checkbox to each Profile2 profile field so that you can selectively expose fields (not entire profile forms) on the registration page.

Would those options address your needs?

jaxpax’s picture

I have solved it with field permissions, so that any fields are visible only to the new role created by the Profile2 Registration path.

jaxpax’s picture

@madmatter - I need to have two types of user types in two different roles, and I use this module to make that happend.

grasmash’s picture

Category: support » feature

@jaxpax - good to know that you found a work around.

I'll switch this issue to a feature request for a new 'add to registration profile' checkbox, which should be available on the field edit pages.

grasmash’s picture

Title: "Show during user account registration" can't found it! » Create
Status: Active » Closed (works as designed)

Closing issue. If you'd like this feature, please simply use the Field Permissions module to control field visibility.

grasmash’s picture

Title: Create » Create field-level visibility settings

Closing issue. If you'd like this feature, please simply use the Field Permissions module to control field visibility.