17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1308 Views |
-
Quick Newsletter Signup

23 September 2008 at 1:42am
I have the Newsletter module up and running perfectly. It uses a separate page, captures names, emails etc and writes perfectly to the database. What i would like to do is just have a simple form (name & email) to appear on every page (i.e. in the right hand column). It would do exactly as the newsletter form (i.e. write to newsletter mailing list) however you would be able to sign up from any page without having to go to a specific 'newsletter page'.
I have tried this code:
http://doc.silverstripe.com/doku.php?id=recipes:forms
however the submissions are not being recorded in the newsletter mailing list.
Any ideas?
-
Re: Quick Newsletter Signup

23 September 2008 at 2:20am
Have you edited this line to include the newsletter group name in your database?
if($group = DataObject::get_one('Group', "Code = 'my-group'")) {
$member->Groups()->add($group);
}You need to change my-group to the name of your newsletter in the form of my-newsletter-name
-
Re: Quick Newsletter Signup

23 September 2008 at 2:41am
Cheers LeeUmm - that's what i was doing wrong... typing the newsletter name in the wrong format.
thanks for your help.
| 1308 Views | ||
|
Page:
1
|
Go to Top |


