Allow limiting registration to one newsletter

deviantintegral - February 27, 2009 - 01:13
Project:Simplenews on register
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi,

The attached patch allows the form to be changed to a dropdown instead of a set of checkboxes. We needed this as we have over 100 newsletters, but users only need to sign up for one. We're also using the Prepouplate module to automatically select the appropriate newsletter, which works well with this patch.

When the single-register option is enabled, the opt-out setting is ignored since you can only choose one item. This patch also fixes the theme function for the admin settings so that any un-rendered form elements are rendered. This means that anyone using hook_form_alter() can expect their changes to be properly rendered.

Any feedback is appreciated!

AttachmentSize
one_newsletter_choice.patch4.89 KB
 
 

Drupal is a registered trademark of Dries Buytaert.