Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#7 | 2208527-7-mailchimp-auth-label.patch | 964 bytes | joelpittet |
#2 | checkbox-vs-form-text-for-authenticated-users-2208527-2.patch | 3.75 KB | mglaman |
Comments
Comment #1
jsibley CreditAttribution: jsibley commentedI 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 ....")
Comment #2
mglamanHere 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?
Comment #3
mglamanComment #5
mglamanPatch was against 2.x-dev (forgot to update on original submission), requeue test.
Comment #6
mglaman2: checkbox-vs-form-text-for-authenticated-users-2208527-2.patch queued for re-testing.
Comment #7
joelpittetIt looks like all the whitespace issues have been fixed. This is just a re-roll of #2 against dev.
Comment #8
joelpittetActually @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 .
Comment #9
joelpittetDuplicate of also #2051273: Signup fields missing? which seems to have a patch that's worth trying. Closing this as a duplicate.