Support from Acquia helps fund testing for Drupal Acquia logo

Comments

a.sinitsa created an issue. See original summary.

Alex Liannoy’s picture

Status: Active » Postponed (maintainer needs more info)

Hello Aleksey,

Could you describe this issue a bit more verbose?

a.sinitsa’s picture

Hi!
If you put some fields in field group, for example horizontal tab, and then hide all fields of this field group for current registration form, empty fieldgroup will be visible

a.sinitsa’s picture

Status: Postponed (maintainer needs more info) » Active
WalkingDexter’s picture

Hi!

I made a patch for fix problem of this issue. Using hook_field_widget_form_alter () to hide the elements it is not good idea, because in this case, hidden only element widget, but wrapper of element is displayed. Therefore, Drupal displaying empty fieldsets (when all elements widgets of filedset are hidden).
I think we need to move hiding elements operation to hook_form_user_register_form_alter().

WalkingDexter’s picture

Status: Active » Needs review
WalkingDexter’s picture

I get a mistake in the first version of the patch, so I made the second version.

WalkingDexter’s picture

Since the need to hide the fields in all forms, not just in user_register_form, I wrote a universal solution. So that's my third version of the patch, I think the final :)

omidehghanZD’s picture

@WalkingDexter
have any patches for d7 version of this module? I have same problem and need to this patch for 7.x version . :(

anpolimus’s picture

Implemented patch in #2802911: Empty fieldsets are still present.
Patch fixes initial problem. If all fields at the field group are disabled - fieldset is gone.

anpolimus’s picture

Status: Needs review » Reviewed & tested by the community

Alex Liannoy’s picture

Hi guys,

Thank you for reporting the bug and preparing the patch for it.
Committed the last patch.

Alex Liannoy’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

W01F’s picture

Seems to still be an issue as of:

Core: 8.6.7
Field Group: 3.x-dev
Multiple Registration: 2.6