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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Error on Post with Default Subscribe Form


Go to End


3 Posts   1855 Views

Avatar
biapar

Forum Moderator, 435 Posts

31 October 2009 at 12:20am

Edited: 31/10/2009 12:22am

Hi,

I've installed last trunk newsletter and userfom. But when post data from loaded form , I've this error:
I my form there are 3 fields: Email, LastName and FirstName.

[Notice] Undefined index: Email
POST /newsletter/Form

Line 189 in /var/www/clients/client1/web4/web/newsletter/code/SubscribeForm.php
Source

180 function process( $data, $form ) {
181 // Add the user to the mailing list
182 $member = Object::create("Member");
183
184 // $_REQUEST['showqueries'] = 1;
185
186 // map the editables to the data
187 $obj_field_map = $this->owner->getObjFieldMap();
188 foreach( $this->Fields() as $editable ) {
189 $field = $obj_field_map[$editable->Title];
190 if( !$field )
191 continue;
192
193 // Debug::message( $editable->Name . '->' . $field );
194
195 // if( $member->hasField( $field ) )

Thank you

Avatar
biapar

Forum Moderator, 435 Posts

31 October 2009 at 12:28am

I've resolved...

Into the source, the fields name are:

static $required_fields = array(
'Email address' => 'EditableEmailField(CanDelete=0)',
'First name' => 'EditableTextField',
'Last name' => 'EditableTextField',
);

Then, I can't change their name from admin area...

And , How can I traslate them in other language?

Avatar
firstpixel

Community Member, 19 Posts

9 February 2010 at 6:26pm

Did anyone manage to rename the labels meanwhile. I've got the same problem right now.

Thanks a lot!