Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

[SOLVED ] Newsletter subscription empty database recipient field


Reply


968 Views

Avatar
servalman

Community Member, 211 Posts

4 November 2009 at 6:45am

Hello Everyone

I found out one reason why when you use the SubscribeForm for a newsletter it creates blank entries instead of filling them :

The name of the fields wich are used in the form are related to the array of variables used to populate the database.

If you want to change the original field names used in the form (let's say from "Email adress" to "Something else" you have to edit

SubscribeForm.php where you will find around line 25 this array :

   static $obj_field_map = array(
      'Email address' => 'Email',
      'First name' => 'FirstName',
      'Last name' => 'Surname',
   );

you will have to change the first row from 'Email address' => 'Something else'

to get it work

   static $obj_field_map = array(
      'Something else' => 'Email',
      'First name' => 'FirstName',
      'Last name' => 'Surname',
   );

It is the same for the other fields

Hope this help

T