Snippets - Little bits of code to make you happy
Disable Default JavaScript Behaviours
Tweet15 February 2010 | | | Supports v2.4, v2.3
By default SilverStripe uses bulky and sometimes unwanted JavaScript libraries to handle form validation and AJAX page commenting features. Often you want to disable this behaviour so you can integrate your own JavaScript code. This is easily achieved with the following two lines in you site configuration file:
mysite/_config.php
Validator::set_javascript_validation_handler('none');
PageCommentInterface::set_use_ajax_commenting(false);
Now you are free to add the behaviours you want to your view (templates) without the hassle of unpredictable SilverStripe JavaScript includes.
Comments
RSS feed for comments on this page RSS feed for all comments
No one has commented on this page yet.
Post a comment ...
You cannot post comments until you have logged in. Login Here.