How could I set/change the value of an enterprise keyword field in a form using javascript?


Well, The Enterprise Keyword works pretty similar to the Managed Metadata Field... So i was able to set the values as i did with the Managed Metadata Field (using javascript):

    var myMetadataField = $('div[Title="' + MetadataField + '"]').find('div[role="textbox"]');

    var myMetadataField = $('div[Title="' + MetadataField + '"]').find('div[role="textbox"]');
    var myContainer = myMetadataField.parent().parent().parent();
    var divElement = myContainer.get(0);

    var controlObject = new Microsoft.SharePoint.Taxonomy.ControlObject(divElement);

Where MetadataField is the title of your managed Metadata field

| improve this answer | |

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.