I have 5 columns in the custom list. Out of which only 3 have to displayed in the NewForm.aspx page.

All of the 5 columns have to be displayed on the EditForm.aspx page. While googling, I have come across the following link :

When I implemented the code that was given on this page, I get an error which says that parentNode is not found. Please guide me how can I implement this requirement.

Any other alternatives other than this are also appreciated.

12 Answers 12


The best way is to open sharepoint designer and create a new custom "NewForm".

There the complete form is rendered as normal table structure. You can just put "style='display:none'" in <tr> and you are done.

enter image description here

  • When I try to edit my existing form in sharepoint designer, it gives me infopath control and does not allow me to edit it. How can I edit it? Please guide. Sep 24, 2013 at 12:13
  • In sharepoint designer go to your list. There you will see an option to create a new form. Just create it and then edit it in advanced mode. You will get the screen as shown above.
    – Garima
    Sep 25, 2013 at 4:21
  • 2
    This is not a good way to hide field. If later you want to make other changes to new form, nothing will happen automatically - you will have to everything by manually updating your custom new form. Better to use PowerShell (like ReTech have answered). Jun 21, 2016 at 7:15

You can access the field you want to hide via Powershell and set ShowInNewForm to false. This will hide this field in you NewForm

$web = Get-SPWeb webUrl
$list = $web.Lists.TryGetList("Listname")
    $field = $list.Fields["FieldName"]
    $field.ShowInNewForm = $false
  • 1
    Thanks. It works good. It would be good if we can add $web.dispose() in the end.
    – Zakir HC
    May 21, 2015 at 8:46
  • By far the best solution mentioned here! Should be marked as the answer. Mar 10, 2017 at 15:29
  • How can I do the same on SharePoint Online? According to MS documentation, Get-SPWeb is only applicable in SharePoint Server Subscription Edition. It seems the equivalent cmdlet in SharePoint online is "Connect-SPOService" followed by "Get-SPOSite", but "Connect-SPOService" requires the admin site (e.g. "xxx-admin.sharepoint.com/"), so "xxx.sharepoint.com/sites/kyle22" doesn't work.
    – Petronius
    Feb 17, 2022 at 14:45
  • Hey, have a look at sharepointeurope.com/csom-hide-site-columns-edit-new-form CSOM (Client Side Object Model) has also the possibility to change ShowInXXForm properties. @Petronius
    – ReTech
    Apr 14, 2022 at 10:02

It's way easier than all of this, go to List Settings, go to advanced settings, "Allow management content types "Yes" go back to list settings. You should see "Content Type" as a link (usually right above columns) click that. It's essentially a view of the form. Now once there you will see a list of all your columns again. Click on the column title, and then on Change Content Type, look at Column Settings. You should see Required, Optional, Hidden. Go ahead and hide. This will keep you from having to use infopath or code it in Sharepoint Designer, and I don't know about your server, but everytime we do a code variation using Infopath it runs much slower on form load time.

  • 6
    -1 This does not work in the context of this question. OP only needs the fields to be hidden on Newform.aspx; they need to be shown on Editform.aspx. Changing the field to Hidden through Content Type settings applies to all three forms. Dec 3, 2015 at 20:48

I would suggest you to use InfoPath 2010. With InfoPath installed in your machine, just by clicking "Customize Form" on the ribbon and it is one of the most useful features in SharePoint 2010.

  • 1
    This is a great approach, if you have SharePoint Enterprise :) Sep 24, 2013 at 12:42

Add a Content Editor webpart to your page and use following JQuery code to hide the fields.

var feedbackField = $("input[title=Feedback]");

The above line of code hides the field named Feedback.


  • I would be careful with this moving forward, it's my understanding (however I haven't seen this in person) that in 2013 and above this code will not work as intended. I'm not sure how accurate this is because I have not coded it myself, however i have colleagues that claim that has been an issue.
    – Ike Rebout
    Jan 28, 2016 at 5:34
  • Also not a very safe option Mar 10, 2017 at 15:39

Another option is to install the free 'SPC3 Show/Hide Fields' feature. This gives you a user interface to easily control which fields are shown on all three form types (display, create, edit) without any custom coding. It is a farm feature, however, so it may not be an available option in every case.



You can use

var field = $("input[title*=Name of the field]");

The * in title is needed because SharePoint 2013 uses "Required Field" on required fields.


I just create new forms for everything, and use Designer to remove the fields in the forms I don't want them to display in, then set those forms as the default.

You can use either the Design OR Code view to delete the rows you don't want to display on the New Item form.

  • Please provide an example on how to achieve that from Designer or Code.. You may also provide a link to post which explains how to Jan 29, 2015 at 15:16

I don't think it is good idea to create copy of NewForm.aspx for this task. Customized forms are very hard to maintain/support. Marc Anderson created cool function to hide different fields on Edit/New forms: http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/

// Function to hide a column's row in the form
function hideColumn(c) {
  $(".ms-formlabel h3 nobr").filter(function() {
    var thisText = $.trim($(this).clone().children().remove().end().text());
 //   alert("::" + thisText + "::");
    return thisText.indexOf(c) === 0 && thisText.length === c.length;

this is for on-premise. in cloud for me worked

$(".ms-formlabel span nobr")

instead of

$(".ms-formlabel h3 nobr")
  • This is not a good idea, because it is very easy to manipulate Mar 10, 2017 at 15:25
  • Hmm, not sure we understand each other) I used different approaches and also created custom forms before. But now I try to use javascript injections only. This function hides any field if You pass display name like hideColumn("Field Display Name"). Also think that SPD will be deprecated in future versions, so js is the best way now
    – Gennady G
    Mar 14, 2017 at 11:08
  • It is very easy to open developer tools in browser and enter some value to hidden fields. This could be a workaround but definitely not best practice. Mar 15, 2017 at 10:24
  • If You mean "best practice" === "more secure", than maybe. In SharePoint there are many ways to solve same problem.
    – Gennady G
    Mar 15, 2017 at 12:04
  • And what if the javascript or even jquery was not able to load? People are going to see hidden fields and are able to enter values there. It would break the whole concept... It is also possible that you are going to have a delay when loading your Javascript. In my opinion, it should be not one of the "many ways". Mar 15, 2017 at 12:10
    .ms-formtable tr:nth-child(8){display:none;}

you can set below property values based on your requirement ShowInDisplayForm="TRUE" ShowInNewForm="FALSE" ShowInEditForm="FALSE"

 <Field DisplayName="testColoumn" Type="Text" Group="_Hidden" StaticName="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" FromBaseType="TRUE" Required="False" ShowInDisplayForm="TRUE" ShowInNewForm="FALSE" ShowInEditForm="FALSE"> </Field>

I chose the hiding solution, but must state that the correct my, IMHO, is to find the closes tr

    var field = $("input[title*=FieldTitle]");

dont forget you must put it in a relevant asp:placeholder (preferred main)

Your Answer

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

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