SharePoint read only fields

3240 pts.
Tags:
SharePoint
How do I make date time field read only in SharePoint?

Software/Hardware used:
SharePoint Javascript

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try using something like this when defining the column.

<script type="text/javascript">
 
$(document).ready(function()
{
//Set the Field to Read only and change its background colour
$("input[title='Metrics ID']").attr("readonly","true").css('background-color','#F6F6F6');
//You can disable the field also:  $("input[Title='Metrics ID']").attr("disabled", "disabled");
});
 
</script>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: