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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

[SOLVED ] Newsletter subscription empty database recipient field

Go to End



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