How to hide sharepoint 2013 user list fields?

1

How to hide sharepoint 2013 user list fields? I need to hide fields in view mode on the userdisp.aspx page

    
asked by anonymous 20.02.2014 / 20:41

2 answers

1

Thanks Tiago found the solution using Sharepoint Power Shell, see below the code:

$site = SPSite("http://www.seusite")
$web = $site.RootWeb
$spList = $web.SiteUserInfoList
$field = $spList.Fields["DataNascimento"]
$field.ShowInDisplayForm = $true
$field.ShowInEditForm = $true
$field.Update($true)
$spList.Update()
$web.dispose()
$site.dispose()
    
21.02.2014 / 17:26
1

If you want to hide fields on a form from either Create / Edit / View, you can edit the content of the form by SharePoint Designer .

Or, via PowerShell , as the colleague there said, you can use the .ShowInDisplayForm/.ShowInEditForm command by setting 'false' or 'true' to each specific field.

    
09.08.2017 / 16:10