Closed (fixed)
Project:
Mailchimp
Version:
7.x-2.1
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2011 at 12:40 UTC
Updated:
13 Jan 2013 at 22:50 UTC
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
Comment #1
levelos commentedhook_form_alter will take care of it. Just set the default_value property of the form checkbox to TRUE.
Comment #3
Lloyd commentedCould someone please provide more detailed instructions on how to do this? Thanks.
Comment #4
levelos commentedIn your module, use hook_form_alter() to change the default value of the subscribe form element to checked.
Comment #5
alexanansi commentedI found this guide which looks like it will help you http://websmiths.co/blog/very-introduction-drupals-hookformalter