Lock form to prevent changes


Posted by Sonoma - Oct 29 ’14 at 10:26

Any way to lock a form to lock a form out to prevent editing or changes to form design?would this be basic  sp security?


  • Dmitry Kozlov
    Dmitry Kozlov
    Member for: 8 years 2 months 8 days
    #1 by Dmitry Kozlov Oct 30 ’14 at 02:14


    Sure, you can disable fields based on condition via JavaScript. Also, you can create a separate form for a particular SharePoint group and turn fields into readonly state. And finally, you can hanle fd.onsubmit event and prevent form from submission:

    fd.onsubmit(function() {
    	if (smth) {
    		alert('Your changes cannot be saved now.');
    		return false;
    	return true;
  • Sonoma
    Member for: 7 years 2 months 5 days
    #2 by Sonoma Oct 30 ’14 at 04:14

    Thank you. I will look into groups.


    I did come up with this.

    $('#fd_form :input').attr('disabled', true);

    It works. Is there a way to modify the SPForm "General Setting" and add a check box that would allow for the user to do this?

    ""CHECKBOX""  Disable all fields  with this code behind it? $('#fd_form :input').attr('disabled', true);







Displaying 1 to 2 of 2 messages