"The day you stop learning SharePoint is the day you stop using it."

Hide a field from SharePoint Designer Form - NewForm/DisplayForm/EditForm

To hide a field from any of the SharePoint Designer Form we usually create a custom form and edit the code and add a style attribute as style="display:none" in <tr> element.

But what if you do not want to create a custom form and hide the field on the default form? Is it possible? The answer is YES.

You can hide the field on default SPD form via PowerShell command without having to create a custom form.

Open SharePoint Management Shell and type the following commands. The below example hides a field from a NewForm.

$web = Get-SPWeb webUrl
$list = $web.Lists.TryGetList("ListName")
    $field = $list.Fields["FieldName"]
    $field.ShowInNewForm = $false

You can similarly execute the below command for DisplayForm and EditForm. The only statement you need to change is:
$field.ShowInDisplayForm = $false
$field.ShowInEditForm = $false

Identify the type of SharePoint List Template

There are three methods that I know to identify the type of SharePoint List template. All the methods has easy steps to execute and find the type:

     1. Using Browser Method
·         Open that SharePoint List which you want to identify its type and ensure to open that list in AllItems.aspx view. Then in your web browser click on the menu bar > View > Source or simply right click on the page and select View Source and search for ctx.listTemplate.
·         Once you find ctx.listTemplate then match its value with the available List Template IDs (Click Here).

     2. Using PowerShell Command
·         Connect to your SharePoint Server and open SharePoint 2010 Management Shell.
·         Type the following commands that would retrieve all list and libraries in a web site. Search the name of your target list/library and match the Type_Client with List Template IDs given in above link.

>> $SPWeb = Get-SPWeb “http://yourSharePointServer/
>> $SPWeb.ListTemplates | Select Name, type, type_client, Description



Using XML
·         Go to List/Library Settings and from the browser URL copy the string that appears after List=
·         Open this web site http://meyerweb.com/eric/tools/dencoder/ and paste the copied string and press Decode button.
·         Now copy the decoded string paste it somewhere in notepad.
·         Get the SharePoint web site URL under which the list/library is created.
·         Now construct the URL as below example:

·         In the above URL all remain same except the website URL before /_vti_bin/ and copy your decoded List ID and put it inside the braces { } after List=
·         Then finally copy the entire constructed URL and paste into IE and press Enter.
·        In the XML returned by browser search for text ServerTemplate and match its value with the List Template ID, link provided in point 1.

SharePoint-StackExchange Moderator

Author's Profile

My photo
A SharePoint Enthusiast working as a Project Lead for an IT Software & Consulting Company in Mumbai. I believe in giving back to the community through which I also learn and develop and eventually grow as an individual and professional. This blog is a small contribution to the community where I live in and may help someone who is seeking knowledge like me. Apart from being a SharePoint Enthusiasts, I am a husband, a father and a blogger. I love to travel and explore new landscapes and meet people of various culture. I am passionate about learning new technology trends in IT. I love spending time on my fitness and have a deep enthusiasm for urdu poetry and career counseling.

Popular Posts

Powered by Blogger.

Contact Form


Email *

Message *

Total Pageviews