Forum Discussion
Dan Barnett
Apr 01, 2019Brass Contributor
Need to hide content type columns on Display form (SP2013)
I have a list that is mostly comprised of content types. The requirements are: to have all columns available on the NewForm and EditForm, but hide all but 2 columns on the DisplayForm. Add'l I...
shobhitbhalla
Apr 02, 2019Brass Contributor
Hi Dan Barnett
Use the below Powershell, change your site URL and column Name
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get the Web
$SPWeb = Get-SPWeb "http://testserver/sites/producttest"
#Get the List
$SPList = $SPWeb.Lists["TestList"]
#Get the Field
$SPField = $SPList.Fields["ColumnTest"]
#Hide from NewForm & EditForm
$SPField.ShowInEditForm = $false
$SPField.ShowInNewForm = $false
$SPField.Update()
$SPWeb.Dispose()