I saw this issue in the 6.x queue, but it seems to persist in 7.x: When a user is logged in/authenticated, the email box turns into a checkbox. This should minimally be an option, or a pre-fill. (In our case, the form is part of the design, and it loses integrity as a checkbox).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jsibley’s picture

I have this problem, as well. It is confusing for users, as there is a checkbox with no label, and it also isn't checked (which would indicate that the user is already subscribed).

I believe that there should be an option to not display the list subscribe checkbox if the user is already subscribed and/or it should be displayed, already checked, with a label indicating what it is showing (something like "subscribed to ....")

mglaman’s picture

Here is a patch for the issue based on the 2.x branch.

The problem is that $list->settings['form_label'] is set, but empty.

'#title' => isset($list->settings['form_label']) ? t($list->settings['form_label']) : t('Subscribe to the @newsletter newsletter', array('@newsletter' => $list->label())),

So it always returns the form_label. Patch changes logic to use !empty()

'#title' => !empty($list->settings['form_label']) ? t($list->settings['form_label']) : t('Subscribe to the @newsletter newsletter', array('@newsletter' => $list->label())),

I haven't tried the 3.x branch, but should this also be rolled against that one?

mglaman’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: checkbox-vs-form-text-for-authenticated-users-2208527-2.patch, failed testing.

mglaman’s picture

Version: 7.x-2.12 » 7.x-2.x-dev
Status: Needs work » Needs review

Patch was against 2.x-dev (forgot to update on original submission), requeue test.

mglaman’s picture

joelpittet’s picture

Component: General » Lists
FileSize
964 bytes

It looks like all the whitespace issues have been fixed. This is just a re-roll of #2 against dev.

joelpittet’s picture

Actually @mglaman that patch doesn't fix the problem at hand. I think this is a duplicate of #2216405: Email field not shown for authenticated users in subscription block .

joelpittet’s picture

Status: Needs review » Closed (duplicate)

Duplicate of also #2051273: Signup fields missing? which seems to have a patch that's worth trying. Closing this as a duplicate.