5

I want to know how to hide columns in new and edit form. I will place text in that column through workflow. I just want to see that column in Display form. I know that is possible with SP Designer, but the problem is that I use people picker in this form, and if I create custom form that form will show me old people picker from sharepoint 2007.

Thanks!

3
  1. To begin, go to List Settings > Advanced Settings:

  2. Select Yes on Allow management of content types?:

  3. Click on one of the existing content types under the Content Type section:

  4. Next, click on the column you intend to hide, and choose the option Hidden. Click OK:

  5. Go to the New Item tab and select the Edit form. You will see that, on both the New Item and Edit forms, the field that you want to hide is not shown, and you're able to save the item without filling in a value for it.

Columns will appear in Display forms.

Source

  • I've tried that and it won't show column in Display form. – Matej Kriznjak Jan 27 '16 at 13:47
  • Strange! Is javascript an option ? – Taran Goel Jan 27 '16 at 13:50
1

Go to List Settings -> Advanced Settings and set Allow management of content types? to Yes. Go back to List Settings and click your content type under Content Types (probably Items). Click the name of the column you want hidden in forms, and select Hidden (Will not appear in forms and save.

  • I've tried that and it won't show column in Display form. – Matej Kriznjak Jan 27 '16 at 13:47
  • @MatejKriznjak You could try making a custom form. Not sure if that is an option you would be will to try. Or you could use javascript to hide the field. – James Flattery Jan 28 '16 at 15:18
0

Whatever the procedure mentioned above by our techies will resolve your query.

And I'd like to add one more step along with that.

  1. Check how many content type you have added for your list in the list setting. (in your case it might be more than one and old content type might be the default one)

  2. If it is more than one, make your new customized content type as default content type or you can delete the old content type

  3. Thats it. Now the default content type will activate when you click "edit" or "Add new"

0

Add content editor/script editor webpart on forms and add some JavaScript/jQuery to hide the field.

This does not require SharePoint designer.

For reference: http://www.c-sharpcorner.com/UploadFile/0e18a8/hiding-a-field-in-newformeditformdisplayform-in-sharepoint/

0

Adding some JavaScript to your Edit and New forms is probably the easiest option in this situation since you only want to see the column on the Display form.

SPUtility.js was specifically built for these types of situations (full disclosure, I maintain this open source library). I'd recommend creating a small HTML page with some code like this:

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"></script>
<script src="/kitsite/Files/sputility.min.js"></script>
<script>
// wait for the window to load
$(document).ready(function () {
   // EXAMPLE: hide two different fields
   SPUtility.GetSPField('Status').Hide();
   SPUtility.GetSPField('Description').Hide();
});
</script>

Then, upload SPUtility.js and your HTML page into a library on your site and add a Content Editor Web Part referencing your page on EditForm and NewForm. Done!

Check out the Installation wiki page for more info on how to get started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.