Download & Extend

Can I make the default for optional lists be subscribed?

Project:MailChimp
Version:7.x-2.1
Component:General
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I have just one newsletter for my website. I want new users to be given the option to subscribe on the registration form (so I don't want a required list), but I want the default to be subscribed. Right now, the default is always not subscribed. Is there a way to do this through the mailchimp module (or do I have to use Drupal hooks)?

If it's not possible through module settings, has anyone done it with hook_form_alter? Any hints?

Thanks,
Maria

Comments

#1

Status:active» fixed

hook_form_alter will take care of it. Just set the default_value property of the form checkbox to TRUE.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#3

Status:closed (fixed)» active

Could someone please provide more detailed instructions on how to do this? Thanks.

#4

Status:active» closed (fixed)

In your module, use hook_form_alter() to change the default value of the subscribe form element to checked.

#5

I found this guide which looks like it will help you http://websmiths.co/blog/very-introduction-drupals-hookformalter

nobody click here