I have the following code in my template.php file which doesn't seem to be doing a thing? Am I missing g something?

function MYTHEME_form_alter(&$form, &$form_state, $form_id) {

  if ($form_id == 'mailchimp_lists_user_subscribe_form_2')
  {
  	$form['mailchimp_lists_user_subscribe_form_2']['#size'] = 22;
  	$form['mailchimp_lists_user_subscribe_form_2']['#attributes']['onblur'] = "if (this.value == '') {this.value = 'Enter Email Address';}";
    $form['mailchimp_lists_user_subscribe_form_2']['#attributes']['onfocus'] = "if (this.value == 'Enter Email Address') {this.value = '';} ";
  }
} 

Comments

Woggers’s picture

Status: Active » Closed (fixed)

Solved.

Needed the following:

$form['mailchimp_lists']['mailchimp_2']['mergevars']['EMAIL']['#attributes']['onblur'] = "if (this.value == '') {this.value = 'Enter Email Address';}";
    $form['mailchimp_lists']['mailchimp_2']['mergevars']['EMAIL']['#attributes']['onfocus'] = "if (this.value == 'Enter Email Address') {this.value = '';} ";