How to set column’s visibility in properties form

SharePoint fields can set to Hidden, Optional or Required. Fields that are set to hidden are never shown in the property forms, but Optional or Required can be also set to be shown or hidden in the property forms by setting the “ShowInNewForm” and “ShowInEditForm” properties. MetaShare respects these SharePoint settings and will show or hide fields in document/workspace properties, during document/workspace creation or when properties are edited.

Unfortunately there is no user interface in SharePoint to change these settings for a column. The “ShowInNewForm” and “ShowInEditForm” properties can however be set if you create the columns programmatically, using field schema XML, or they can be modified with PowerShell.

This is how you set the visibility of a field in the property forms, using PnP.Powershell script, when the columns are in the content type hub:

# Modify following values as needed
$ContentTypeHubUrl = "https://tenant.sharepoint.com/sites/contentTypeHub"
$FieldInternalName = "SomeField"
$ShowInNewForm = $false
$ShowInEditForm = $true

# Connect to your tenant's content type hub
Connect-PnPOnline $ContentTypeHubUrl -UseWebLogin

# Get and update the field
$field = Get-PnPField -Identity $FieldInternalName
$field.SetShowInNewForm($ShowInNewForm)
$field.SetShowInEditForm($ShowInEditForm)
Invoke-PnPQuery

Disconnect-PnPOnline

For the changes to be visible in the workspaces/sites, you will need to republish the content types where these columns are being used.