I have custom fields made for user registration and Newsletters are show after Username / Email, i tried to find something like this: http://drupal.org/node/998862 and i only found this solution at mailchimp_list.module:

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

  if (!empty($lists)) {
    // wrap in a fieldset
    $form['mailchimp_lists'] = array(
      '#type' => 'fieldset',
      '#title' => t('Newsletters'),
      '#tree' => TRUE
    );

Add " '#weight' => 50,":

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

  if (!empty($lists)) {
    // wrap in a fieldset
    $form['mailchimp_lists'] = array(
      '#type' => 'fieldset',
      '#title' => t('Newsletters'),
      '#weight' => 50,
      '#tree' => TRUE
    );

There is the only solution i found to see always at end of register form. Can be do more user friendly?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adshill’s picture

Status: Active » Reviewed & tested by the community

I believe this should be committed. It would be better to be user configurable but to not have a weight means it just floats in a the registration form without any way to control it. This at least makes it appear in a sensible place.

levelos’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Guys, this is hardly reviewed and tested by the community, there's not even a patch file in the issue. I hardly see how hardcoding a weight of 50 is better than no weight at all. This problem is also easily solved with a hook_form_alter().

jasonawant’s picture

Issue summary: View changes
Status: Closed (won't fix) » Needs review
FileSize
736 bytes

Hi,

What do you think about this approach? I've added the mailchimp_list form element as an extra field to the user entity. This exposes it the UI for drag&drop placement for the user register and profile forms and any other display mode if desired.

Sorry, I've re-opened this instead of creating a new feature request..I didn't realize is was closed until after I made the patch!

Jason

amytswan’s picture

Status: Needs review » Closed (won't fix)

“And now our watch [for support of the 7.x-2.x version of the MailChimp module] has ended…” With the approaching deprecation of MailChimp’s API version 2.0, I’m sad to say we too must turn the page. This branch will become unsupported in early October and officially deprecated by the end of this year (2016).

Fret not! The 7.x-4.x and 8.x versions come highly recommended. Both are using Mailchimp’s new API 3.0 and are being actively maintained. If you find this issue still exists on either the 7.x-4.x or 8.x branches, let us know by opening a new ticket. “What is dead may never die, but rises again, harder and stronger!”