How to change the title of submit button when someone register in mailchimp? I want to be able to change the title of the submit button of the Mailchimp block when someone subscribes or unsubscribes to mail chimp list. I'm using mailchimp block on D7.
How shall I do it?
As mentioned, you'll want to use hook_form_alter(). You can check if the user has subscribed with mailchimp_is_subscribed() and change the submit button text accordingly.

/**
 * Implements hook_form_alter().
 */
function my_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'mailchimp_lists_user_subscribe_form_test') {
    global $user;
    // First parameter is the list id, which can be found here:
    // https://polkaspots.zendesk.com/hc/en-us/articles/201070513-Where-can-I-find-my-MailChimp-API-key-and-List-ID
    $form['submit']['#value'] = mailchimp_is_subscribed('123abc', $user-&gt;mail) ? t('Unregister') : t('Register');
  }
}