Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Again: Newsletter subscription form

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 4518 Views
  • martinv
    Avatar
    Community Member
    2 Posts

    Again: Newsletter subscription form Link to this post

    I searched the forum, but could not find a precise answer to enabling the newsletter subscription form.

    I have enabled User Defined Forms module. but the question I cannot find answer to is:
    What would be the correct action that is called by form? Must I define that action separately?

    The desired result would be that user fills the form and presses "Subscribe" button. User is then added to the subscribers list. As I understand, by default the User Defined form submission is only emailed to the specified address.

    So I would be extremely thankful if either:
    1. Someone pointed me to the right direction regarding the form action
    2. Someone pointed me to precise instructions regarding integrating the newsletter subscription - the instructions on otherwise excellent SS documentation server are less than complete regarding that matter.
    3. At least could someone point me to the site where I can see a working newsletter module in action (I don't mean the tiny form at the bottom of silverstripe.org).

    Thank you in advance
    Martin

  • JackAttack
    Avatar
    Community Member
    12 Posts

    Re: Again: Newsletter subscription form Link to this post

    I think you need to add a new page of type "Subscribe Form". People who submit this form will then be added to the mailing list you've set up for the newsletter. You may want to make a new group for newsletter subscribers. To do this go to Security, create a new group, then go back to Newsletter, click the list name and set Mailing list group to the group you just created. All future subscribers will be added to this list.

    This is what I've figured out on my own.. could be wrong...

  • BruceG
    Avatar
    Community Member
    29 Posts

    Re: Again: Newsletter subscription form Link to this post

    the problem I'm having with this is that a blank record is being added to the mailing list after subscription to the newsletter.

    Any one got any ideas??

  • Bluefruit
    Avatar
    Community Member
    6 Posts

    Re: Again: Newsletter subscription form Link to this post

    Hey BruceG, I have exactly the same problem with the newsletter module, it all seems to work fine, other than entries are not populating the DB, getting very frustrating, I'm sure I'm missing something fairly straight forward just no idea what! Please update this thread if you get anywhere with this.

  • freedolin
    Avatar
    Community Member
    6 Posts

    Re: Again: Newsletter subscription form Link to this post

    I have the same problem. Everything is going fine besides that if one fills out the subscribe page an empty record is inserted in the database. I have read some other posts here and I think the problem was already mentioned in January 2009.

  • Pranil
    Avatar
    Community Member
    17 Posts

    Re: Again: Newsletter subscription form Link to this post

    Yup i'm having exactly the same problem, when tries to subscribe on the frontend of the site it enters a blank record in the db. *shameless bump*

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Again: Newsletter subscription form Link to this post

    Yeah, same behavior here. Sadly, this renders the module unusable.
    I filed a bug for this, maybe somebody likes to add something to it? Maybe post your SilverStripe configuration?
    http://open.silverstripe.org/ticket/4510

  • Pranil
    Avatar
    Community Member
    17 Posts

    Re: Again: Newsletter subscription form Link to this post

    Hey so I made a new page type for subscription following this http://doc.silverstripe.org/doku.php?id=recipes:forms, and it checks if there's already a user registered with that email addy. Not the most elegant solution, but it gets the module working. Note that it doesn't check if the user is a member of the newsletter group, just if they're in the members table.

    Have attached file, will take a look at the code for the module's subscription form when I get some time.

    To get it working:
    1. Copy the attached file to /mysite/code/ folder.
    2. Set the $defaultGroupID on line 9 to whatever your newsletter group is.
    2. In backend create a new page of type 'Registration Form'.
    3. Save and Publish to your site.
    4. You'll have to create the success and failure pages, currently uses two different failure pages. Success page is on line 57, failure pages on line 47 & 62. Just update the strings with whatever your pages are.

    And that's it, on the frontend you'll see a new register page. Note that the fields are in the php file, and this file is set up to work with recaptcha for spam protection. Shouldn't be hard to change if you want to use mollom or something. Feel free to improve it!

    Attached Files
    4518 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.