Hi all

I am using the MailChimp module. I want to make a small change outside of the module, whereby I change a variable.

function mailchimp_lists_form_user_register_form_alter(&$form, &$form_state, $form_id) {
  $account = $form['#user'];

  $account->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';

  $lists = mailchimp_lists_get_available_lists($account, array('show_register_form' => 1));

  if (!empty($lists)) {
    // Wrap in a fieldset.
    $form['mailchimp_lists'] = array(
      '#type' => 'fieldset',
      '#title' => t('Newsletters'),
      '#tree' => TRUE,
    foreach ($lists as $list) {
      mailchimp_lists_auth_newsletter_form($form['mailchimp_lists'], $list, $account, $list->settings['required']);

I need to change the line '#title' => t('Newsletters'), to '#title' => t('Something Else'),

I am sure that I need to add something into my theme's template.php but I am struggling with what to add.

Any pointers would be really helpful.


Mth’s picture

I tried to add the function mailchimp_lists_form_user_register_form_alter in template.php but I got the PHP error "Fatal error: Cannot redeclare mailchimp_lists_form_user_register_form_alter() (previously declared in ..."