Hiding Wiki Library Custom Columns

I was intrigued by Phil Wicklund‘s post on removing custom columns from wiki pages until I saw that his solution requires modifying the underlying template file (DocumentTemplates\wkpstd.aspx) and will affect every wiki on the farm. Fortunately, the control he suggests deleting (ListFieldIterator) respects fields’ ShowInDisplayForm property, which can be set in a number of ways:

  • Feature: Attribute of Field or FieldRef elements in a site column, content type or list template
  • Feature receiver:
    var web = properties.Feature.Parent as SPWeb;
    var field = web.Lists["MyWiki"].Fields["HideMe"];
    field.ShowInDisplayForm = false;
  • PowerShell:
    $web = Get-SPWeb $url
    $f = $web.Lists['MyWiki'].Fields['HideMe']
    $f.ShowInDisplayForm = $false
  • Sharad Kumar‘s Form Settings editor (CodePlex)

Any of these should be preferred to modifying the hive and breaking supportability.


One Response to “Hiding Wiki Library Custom Columns”

  1. Phil Wicklund Says:

    Nice tip! I didn’t know that property existed… but now that I do, I can think of a ton of great reasons to use it.


Comments are closed.

%d bloggers like this: