How to disable the "save" button in a form is no changes was made

xycofryx

Member
How to disable the save button in a form is no changes was made.

EDIT:

Never mind... just figured out that a a simple JQuery hack would do (by adding it to my custom.js)
Code:
        $(".save").prop("disabled",true);
        $("form").on("change", ":input",
            function(){
                $(".save").prop("disabled",false);
            }
        );
 
Last edited:
Yup, that's pretty much exactly the code I would have suggested. :)

There are some corner cases where stuff can get changed without a 'change' event getting fired, but hopefully you won't run into any.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top