Posted by JustMagicMaria on November 2, 2011 at 12:40pm
6 followers
Jump to:
| 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
hook_form_alter will take care of it. Just set the default_value property of the form checkbox to TRUE.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
Could someone please provide more detailed instructions on how to do this? Thanks.
#4
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