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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

how to disable Behaviour.register({


Go to End


3 Posts   2472 Views

Avatar
snaip

Community Member, 181 Posts

9 January 2010 at 3:12am

Edited: 09/01/2010 3:12am

hi

how to disable form validation ?

i'm using jquery validation form not prototype like SilverStripe

i disabled this files
Requirements::block('jsparty/prototype.js');
Requirements::block('jsparty/behaviour.js');
Requirements::block('jsparty/prototype_improvements.js');
Requirements::block('sapphire/javascript/Validator.js');
Requirements::block('sapphire/javascript/i18n.js');
Requirements::block('sapphire/javascript/lang/en_US.js');

but in source still have
//<![CDATA[
Behaviour.register({
"#Form_inneForm": {
validateNumericField: function(fieldName) {
....

}

Avatar
Willr

Forum Moderator, 5523 Posts

9 January 2010 at 3:07pm

Edited: 09/01/2010 3:07pm

Perhaps try setting the validation handler to none as well.

Validator::set_javascript_validation_handler('none');

Avatar
StuM

Community Member, 59 Posts

27 June 2010 at 12:58pm

This needs to be stickied, or put in important recipes or something, I hate prototype and always want custom validation with jQuery, so I keep coming up with various methods to disable the form validation, my favourite was to create an custom form that just did "jsValidationIncluded" = true, but it always has issues with built in forms like forgotten password, I'm so glad to have found this finally