Managed Metadata

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Jeff Childers
Posts: 18
Joined: Sun May 25, 2014

19 Dec 2013

I need the ability to create and set managed metadata columns based on the value of an item in a form. I notice that setting managed metadata is not included in your post on how to set field values.

Is this something that I can do with SPFORM or do I need to turn to spservices or something similar to do so?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

22 Dec 2013

Hello Jeff,

Thank you for your question. Please, try the following code to set Managed Metadata field:

Code: Select all

fd.field('Metadata').control()._el()
    .find('.ms-inputBox').html('Term 2');

var metadata = new Microsoft.SharePoint.Taxonomy.ControlObject(
    fd.field('Metadata').control()._el().find('.ms-taxonomy').get(0));

metadata.validateAll();
Replace 'Metadata' with the internal name of your field in both places and 'Term 2' with the title of your term.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests