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

memberprofiles validation of added field


Go to End


1048 Views

Avatar
nicanor

Community Member, 15 Posts

16 August 2011 at 1:46am

I added a field a field "Accept Terms" like it is descriped here:
http://deadlytechnology.com/silverstripe/membership-module/

But there is no error shown when they checkbox is not selected. I choosed requiered for the field in BE. Email is send with Activation Key. Now when the User tries to activate, comes up an error "Page not found".

Does anybody know how to validate if the checkbox "Accept Terms" is checked directly in the form?

Here my Seller Class:

<?php
class Seller extends DataObjectDecorator{
	function extraStatics(){
		return array(
			'db' => array(
				'AcceptTerms' => 'Boolean'
			)
		);
	}
}
?>

And the line in config:

Object::add_extension('Member', 'Seller');