Using SharePoint Designer, you can make one of the columns on your list/library Read-Only so that when a user goes to edit the list item, that one particular field will be unmodifyable, even for Full Control Permissions.
This can be done by changing the field type from an “editable” field to a simple “display” field.
To do this, open up SPD and navigate to your list.
You want to create a new “Edit” form for this list so click on the “New…” button:
Type in a name for your new form. Select the “Edit Item Form” radio button and go ahead and make this the default form for editing.
Click OK and then open up your new form to edit the code.
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="Edit" FieldName="Read_x002d_Only" __designer:bind="{ddwrt:DataBind('u', concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims( string(@ID)),'@Read_x002d_Only')}"/> <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="Read_x002d_Only" ControlMode="Edit"/>
to
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="Display"
FieldName="Read_x002d_Only" __designer:bind="{ddwrt:DataBind('u',
concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(
string(@ID)),'@Read_x002d_Only')}"/>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}"
FieldName="Read_x002d_Only" ControlMode="Display"/>
Now when you go to edit an item on your form via “Edit Properties”, the column will be read-only.
Reference:
http://sharepoint.indigoreality.com/2013/04/03/sharepoint-2010-making-a-column-read-only/
No comments:
Post a Comment