Lock form to prevent changes

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Sonoma
Posts: 88
Joined: Wed Oct 15, 2014

29 Oct 2014

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?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

30 Oct 2014

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:

Code: Select all

fd.onsubmit(function() {
	if (smth) {
		alert('Your changes cannot be saved now.');
		return false;
	}
	
	return true;
})

Sonoma
Posts: 88
Joined: Wed Oct 15, 2014

30 Oct 2014

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);

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests