Question

I want only some columns to be displayed when I click on edit items option. It should be a customized form having only few columns to be edited. Is there any way to do it?

Was it helpful?

Solution

You have more options other than the jQuery hack:

Option 1: custom edit form

Create a new EditForm in SharePoint designer and set it as default. To do this, in SPD go to your list, then Forms > New > Edit item form > set as default form. You can then customize the form and delete from the generated xslt/html code the fields you don't want to be editable.

Option 2: content type management / hide columns

Enable content types management. Using the browser UI, go to List settings > Advanced Settings > Allow management of content types > yes > OK. Then, under content types, click on the content type (eg. Item), and click on each column you don't want to be editable, then set Hidden (Will not appear in forms). Caveat: hidden columns won't appear in the newform either

OTHER TIPS

You need to set the ShowInEditForm field property to false in order for a field to be not shown in the Edit Form.

UPDATE

ShowInEditForm property is not available through UI while creating a column. If you are restricted to creating columns through UI only, then you may have to hide columns through JQuery/Javascript Place a content editor webpart or script editor webpart (2013) in the Edit form and use this script as an example to hide a field:

<script src="http://sp2010:90/JQuery/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
var locationField = $("input[title=Location]"); 
locationField.parent().parent().parent().hide();   
</script>

As can be seen the script needs JQuery to be placed in a library

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top