We wanted to be able to theme and position and the check box on the registration page. At present there are no classes attached. I made the following changes to the module:

Original
line 143:

    foreach ($lists as $list) {
      if ( variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) !== 'required' ) {
        $list_form['chimpmail_list_'. $list['id']] = array(
          '#type'           => 'checkbox',
          '#title'          => $list["name"],
          '#default_value'  => variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) == 'optout' ? true : false,
          '#description'    => variable_get( 'mailchimp_list_'. $list['id'] .'_description', '' ),
        );
      }
    }
    if( $list_form ) {
      $form['chimpmail_lists'] = array(
          '#type'         => 'fieldset',
          '#title'        => t('Newsletter subscriptions'),
          '#weight'       => 5,
          '#collapsible'  => false,

to...

    foreach ($lists as $list) {
      if ( variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) !== 'required' ) {
        $list_form['chimpmail_list_'. $list['id']] = array(
          '#type'           => 'checkbox',
          '#title'          => $list["name"],
          '#default_value'  => variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) == 'optout' ? true : false,
          '#description'    => variable_get( 'mailchimp_list_'. $list['id'] .'_description', '' ),
          '#prefix'         => '<div class="mailchimp-sub-check">',
          '#suffix'         => '</div>',
        );
      }
    }
    if( $list_form ) {
      $form['chimpmail_lists'] = array(
          '#type'         => 'fieldset',
          '#title'        => t('Newsletter subscriptions'),
          '#weight'       => 5,
          '#collapsible'  => false,
          '#prefix'       => '<div class="mailchimp-form">',
          '#suffix'       => '</div>',

So basically just adding #prefix and #suffix to the fieldset and the checkbox. Would be great to slip these, and maybe some others, into the next release to enable theming.

Cheers,
Neil

Comments

levelos’s picture

Assigned: Unassigned » levelos
Status: Active » Closed (duplicate)

put in some classes in the most recent committ, hopefully enough to manipulate what you need. Duplicate of #427980: Add class to fieldset on registration page