1

I use SharePoint 2013 and I want to hide some columns from the NewItem and Edit Form, but not from the View Item form. I am not using content types atm so a solution without content types would be awesome.

I don't want to change the code in SharePoint Designer, because I am still working on the library (adding columns, changing column ordering etc.) and I want the default form which is synchronizing with what I am editing.

Is this even possible?

Thank you!

2
  • Is using InfoPath a viable solution? Commented Sep 9, 2016 at 8:06
  • using javascript is a option, yes its code but minimum, no deployment required Commented Sep 9, 2016 at 8:19

2 Answers 2

0

You can use jQuery to hide parts of the form. Edit the form, add a content editor web part, link it to a javascript file that is stored in the site collection style library or the site asset library.

Then you just need to figure out how to identify the row you want to hide. Fortunately, the hard work has already been done. Marc Anderson has written up this tutorial.

4
  • Thank you, that sounds really great. I have never worked with jQuery before. Where can I type in the code? Commented Sep 9, 2016 at 12:14
  • You may want to engage your favourite search engine to learn more about jQuery. It's a learning curve and not a ready, push-button solution. But you don't need to install anything on the server and you don't need to be a farm administrator. Commented Sep 10, 2016 at 8:24
  • All you need is access to a document library to store your javascript files and edit permissions to a list, so you can edit the list form. You can write the javascript with Notepad and upload it to a document library (or the site collection style library or the site asset library). You then need to add a content editor web part to the the form you want to change (i.e. the edit form or the new form, or the display form) and link the CEWP to the javascript file. This is not something you can learn within one hour. Be prepared for a few days of learning. Commented Sep 10, 2016 at 8:24
  • Thank you. I guess I'll get back to you when I try this in a few days!! Commented Sep 13, 2016 at 7:31
0

I don't know how are you deploying your site columns (VS, UI...), if you are using visual studio, you can set in which form do you want to show your column site through the properties 'ShowInEditForm', 'ShowInNewForm' and 'ShowInViewForms':

https://msdn.microsoft.com/es-es/library/microsoft.sharepoint.spfield_members

If they are already deployed, you can update this field using powershell (if your enviorment is on-premise) or CSOM (on-premise/online)

I'm not sure you can approach this behaviour just using the user interface

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.