0

How could I disable a managed metadata field?. I'm pulling the information of that field from another List and I don't want the user to modify its value

  • Can you explain a bit more? You mean you want user to only read data from the list? – Amal Hashim Apr 16 '15 at 21:42
  • I don't want the user modify the values I'm setting in that field – yngrdyn Apr 17 '15 at 1:43
  • Can't you disable the field by making it read only? – Amal Hashim Apr 17 '15 at 1:44
  • No i can't. Because it's a Managed Metadata field. So i don't know well what do i have to make read only, there certains divs and things that Sharepoint creates to managed this kind of field – yngrdyn Apr 17 '15 at 3:28
0

You can make the MMD field hidden, through PowerShell

  • Can you please add more details about how to do this? – Robert Lindgren Apr 17 '15 at 8:35
0
function Get-TermSet([string]$groupName, [string]$termSetName)
  {
  $termStore = Get-TermStoreDefault
  return $termStore.Groups[$groupName].TermSets[$termSetName]
  }


 $termSet = Get-TermSet $yourtermStorGroupName $yourtermSetName

 $taxoField = $yourweb.Fields.CreateNewField("TaxonomyFieldType",
  $displayName)

 taxoField.SspId = $termSet.TermStore.Id

 taxoField.TermSetId = $termSet.Id

 taxofield.AllowMultipleValues = $false

 taxofield.Group = $fieldGroup

 taxofield.StaticName = $staticName

 taxofield.ShowInEditForm = $false #here is the solution

 taxofield.ShowInNewForm = $false #here is the solution

 taxofield.Hidden = $true  #here is the solution

 taxofield.Required = $false

 $web.Fields.Add($taxofield);

 $web.Update();

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.