When email notifications are enabled, the opt-in/out check box displays on the user edit account page. However, its position is fixed as it is not exposed as a movable field to site administrators under /admin/config/people/accounts/form-display. This creates major interference in creating a custom form display for user account fields.

Comments

playful created an issue. See original summary.

kiwimind’s picture

Seeing as the field is being added via a hook_form_alter, rather than being created as an extra field, and therefore configurable, this will need reworking to behave differently.

I was after a way of trying to add the field to a field group, and have done so by putting the following in my own form_alter:

$form['#group_children']['private_messages'] = 'group_name';

I realise that this doesn't fix the issue, but hopefully it might help you get further.

jaypan’s picture

Assigned: Unassigned » jaypan

  • Jaypan committed 0b7e091 on 8.x-1.x
    Issue #2916458 by Jaypan: Email notification opt-in/out not exposed as...
jaypan’s picture

Status: Active » Fixed

Seeing as the field is being added via a hook_form_alter, rather than being created as an extra field

It's not an either/or situation, they are both required. I have added the extra field now, and the field is configurable.

Status: Fixed » Closed (fixed)

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