Grab the feed

School is a twelve-year jail sentence where bad habits are the only curriculum truly learned.

John Taylor Gatto

Recent comments

Simplenews Modification

Hey there,

I took a stab at modifying this for use with Simplenews. Seems like the only required change is in the _newsletter_checkbox_form_submit function. Make the second argument of simplenews_subscribe_user the term ID of the newsletter you want the checkbox to apply to; for me it happened to be 2.


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

Thanks for laying the groundwork!

Add your comment