Hide the SharePoint list column in “New from” using PowerShell

Advertisements
In this example we want to hide the column in the "NewForm.aspx" page, we are hiding the “hide column” using the below Power Shell script.


#Get the site that you want to access the list
$webUrl = Get-SPWeb http://dotnetsharepoint/sites/sharepoint/
#Get the list name
$listname = $webUrl.Lists["DemoHideColumn"]
#Get the Column that you want to hide
$columnName = $listname.Fields["HideColumn"]
# hide the column from New Form using the ShowInNewForm property
$columnName.ShowInNewForm=$false
#if you want to show it again change to $true
$columnName.Update()
$listname.Update()
$webUrl.Dispose()

After completing the Power Shell we can get the Output as shown below in the NewForm.apsx.


Advertisements
SHARE

lakshmitulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment