Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » how to disable Behaviour.register({

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

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

Page: 1
Go to End
Author Topic: 1958 Views
  • snaip
    Avatar
    Community Member
    180 Posts

    how to disable Behaviour.register({ Link to this post

    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) {
    ....

    }

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: how to disable Behaviour.register({ Link to this post

    Perhaps try setting the validation handler to none as well.

    Validator::set_javascript_validation_handler('none');

  • StuM
    Avatar
    Community Member
    56 Posts

    Re: how to disable Behaviour.register({ Link to this post

    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

    1958 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.