Managed Metadata
- Jeff Childers
- Posts: 18
- Joined: Sun May 25, 2014
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?
Is this something that I can do with SPFORM or do I need to turn to spservices or something similar to do so?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello Jeff,
Thank you for your question. Please, try the following code to set Managed Metadata field:
Replace 'Metadata' with the internal name of your field in both places and 'Term 2' with the title of your term.
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();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests