Lock form to prevent changes
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello,
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:
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:
Code: Select all
fd.onsubmit(function() {
if (smth) {
alert('Your changes cannot be saved now.');
return false;
}
return true;
})
hank 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);
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);
-
- Information
-
Who is online
Users browsing this forum: No registered users and 13 guests