2

I am using sharepoint 2010. I have a document library. This document library has no content types. It has directly 5 columns. When I go to this document library I see the allItems view and shows all columns. When I try to add, edit or view an item I see only 2 columns: Title and Name. So I miss my other columns.

How can I fix this?

I know the workaround to create a custom form, but I dont want to have other form urls.

UPDATE: See one of the columns I am missing in powershell.enter image description here

3
  1. Go to Document Library > Library Settings
  2. Click on the Advanced Settings
  3. Click 'Yes' in 'Allow management of content types?'
  4. Come to Library Settings
  5. Click on the 'Document' under 'Content Types'
  6. Click on 'Add from existing site or list columns'
  7. Choose 'List Columns' under 'Select columns from:'
  8. Add the columns which are not showing in the NewItem, EditItem and ViewItem forms
  9. Click 'OK'

Above should fix the issue.

0
1

Try setting ShowInNewForm, ShowInEditForm, ShowInDisplayForm to true

$web = Get-SPWeb "http://test"
$list = $web.Lists["listname"]
$field = $list.Fields.GetFieldByInternalName("nameofcolumn")
$field.ShowInEditForm = $true
$field.ShowInNewForm = $true
$field.ShowInDisplayForm = $true
$field.Update()
$web.Dispose()
4
  • I try this powershell script but doesnt help..
    – Ola
    Jul 9 '14 at 7:25
  • I modified the script, to call SPField.Update() at the end.
    – sssreddy
    Jul 9 '14 at 14:41
  • Doesn't have any effect in my case either.
    – Jussi Palo
    Sep 21 '17 at 12:29
  • For me it worked with uppercase variables $True
    – dns_nx
    Oct 29 '20 at 10:55
0
  1. Create a content types that inherits from Document that includes your additional columns.

  2. If you're creating a custom list definition in Visual Studio you can set the ShowInNewForm, ShowInEditForm etc attributes to True.

  3. Try this: https://spcolumnpermission.codeplex.com/

EDIT: 4. When creating your document library columns, under the Additional Column Settings group there is a check box that read 'Add to all content types'. Try checking that.

2
  • the columns are created on document library level. They are not available on site columns. so I cannot create a new contenttype and add these columns to it.
    – Ola
    Jul 8 '14 at 13:22
  • @KHA If you add the content type to the list, you should be able to add columns from the list to the content type.
    – wjervis
    Jul 8 '14 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.