If you are not familiar, Newsletter Checkbox is a feature that puts a newsletter opt-in checkbox at the bottom of the contact form(s). Is this feature (or a feature like it) available in simplenews? I've looked at the documentation and don't see anything obvious and also spent about an hour searching through the issues. I can't seem to find the answer.

If not, can I make this a feature request? This module appears to have 99% of the functionality I need, less this contact form checkbox.

Thanks!

Comments

gcassie’s picture

I had to do this for simplenews. Just change the last function in Newsletter Checkbox as follows, and replace the second argument of simplenews_subscribe_user with the term ID of the newsletter you want the checkbox to apply to:

function _newsletter_checkbox_form_submit($form_id, $form_values) {
  if ($form_values['subscribe_newsletter']) {
    $email = $form_values['mail'];
    simplenews_subscribe_user($email, 2, FALSE);
  }
}

Its working so far, but I've only tested it a couple of times.

CMatters’s picture

Hmm... That's a lot simpler than what I did. I'll try it out.

sutharsan’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.