Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Quick Newsletter Signup

Go to End

3 Posts   1661 Views


Community Member, 199 Posts

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:

however the submissions are not being recorded in the newsletter mailing list.

Any ideas?


Community Member, 470 Posts

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'")) {

You need to change my-group to the name of your newsletter in the form of my-newsletter-name


Community Member, 199 Posts

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. :)