How do I add some javascript validation to the admin interface form’s onsubmit?
Every post / page / post type is wrapped around a universal form with the ID of #post. So if you want to validate a page before submitting it you just need to say something like: jQuery(document).ready(function($){ $(‘#post’).submit(function(){ // Validate Stuff return false; }); }); Then you’ll want to actually enqueue your javascript – View … Read more