Download & Extend

Remove compulsory 'Sign up for [title_of_list]' from description.

Project:MailChimp
Version:7.x-2.9
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Versions 7.x-2.6 and 7.x-2.6+2-dev

When I try to override the Mailchimp Block title for a list in the blocks admin UI, the value entered in the Title field is saved but NOT displayed. I've tried with ''. I've tried flushing all caches & restarting the server. No change. Broken.

Edit - Tried every version from 7.x-2.6+2-dev down to 7.x-2.0-Rc2. Same problem. In the end, I installed 2.5 - I prefer the 'Subscribe' label to the more generic 'Save'.

Comments

#1

Status:active» closed (cannot reproduce)

Steps taken (using Mailchimp 7.x-2.x-dev):

  • Goto: admin/structure/block
  • Click on "Configure" next to MailChimp block
  • Edit "Block title"
  • Click "Save"

Block title entered is shown as the title on the MailChimp block.

#2

Hum... Looking back at this, I think that I might have been thinking about the subtitle of this block.

I'm definitely able to change the block's name as suggested in #1. But what I really wanted was to be able to change the 'Sign up for [title_of_list]' that appears just underneath.

AFAIK, the only way to do this is by 'hacking' the mailchimp_lists.module or writing a custom module that overrides this string.

#3

Title:Can't override the default title for the block» Remove compulsory 'Sign up for [title_of_list]' from description.
Category:bug report» feature request
Priority:major» normal
Status:closed (cannot reproduce)» active

I agree,
I think the 'Sign up for [title_of_list]' text should not be hard-coded in the block description.
It kind of defeats the purpose of allowing people to customise the block message at all, when you have no control over that first line.
Maybe a better solution would be to display that hard-coded message if the description was left empty?

#4

Version:7.x-2.6» 7.x-2.9

Just upgraded and this is still an issue. Is there really no way to remove that text in the UI?

I did it with an override in template.php

function THEMENAME_form_mailchimp_lists_user_subscribe_form_NEWSLETTER-LABEL_alter(&$form, &$form_state, $form_id) {
  $form['mailchimp_lists']['mailchimp_NEWSLETTER-LABEL']['title']['#markup'] = '';
}

In my case NEWSLETTER-LABEL is 'newsletter_sign_up'

#5

I've been doing the same thing, but with a hook_form_FORM_ID_alter implemented in a custom module.

function CUSTOM-MODULE_form_MAILCHIMP-FORM-ID_alter(&$form, &$form_state){
    $form['mailchimp_lists']['mailchimp_LIST-NAME']['title']['#markup'] = '';
}

Just thought I'd share another solution that's not theme specific.

It would be good to not have to do this for every site and Mail Chimp list however.

#6

function MYMODULE_form_alter(&$form, $form_state, $form_id) {
  if (isset($form['#attributes']['class'][0]) && $form['#attributes']['class'][0] == 'mailchimp-lists-user-subscribe-form') {
    foreach($form['mailchimp_lists'] as $key => $value) {
      if (is_array($value)) {
        $form['mailchimp_lists'][$key]['title']['#markup'] = '';
      }
    }
  }
}