In drupal how to add name field to simple news block.If we install simple news module we can get a email field,radio buttons Subscribe Unsubscribe and save button .how can i add Name and text box
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can add a Name field using hook_form_alter(). You will also need to add a submit handler so you can store the name in the database. Something like this...
Use webform module instead
Create a file called simplenes.inc in your module/webform/component directory and copy the code below. You'll have a new Webform component called "simplenews". You can then select which newsletter this field should subscribe to.
This was not heavily tested at all, use it at your own risk.
Source: http://drupal.org/node/127178