Hi Nintex Community,
I try to automatically fill in a managed metadata control based on user profil properties values and I wonder If there is a way to reach this dynamically with javascript?
Thanks.
Hi Nintex Community,
I try to automatically fill in a managed metadata control based on user profil properties values and I wonder If there is a way to reach this dynamically with javascript?
Thanks.
Hi everyone,
I finally managed to populate a Nintex managed metadata control with jquery!
Here is the explained code :
/* Modify the metadata field */ var metadataField = $('#' + fieldID).find('div[role="textbox"]'); metadataField.html("Term"); /* Update the hidden input value (Useless if terms have unique name) */ var hiddenField = $('#' + fieldID).find('input[type="hidden"]'); hiddenField.val("Term|00000000-0000-0000-0000-000000000000"); /* Get the parent HTML element (same id without "editableRegion" at the end)*/ var parentId = metadataField.attr("id").replace("editableRegion",""); var element = $('#' +parentId).get(0); /* Validate my metadata field */ var controlObject = new Microsoft.SharePoint.Taxonomy.ControlObject(element); controlObject.validateAll();
Hope it'ill help.
Thank you so much Canatan, you saved my day!
In my case it was easier to assign a css class name to the control and then replace this line:
var metadataField = $('#' + fieldID).find('div[role="textbox"]');
for this one:
var metadataField = $('.class_name').find('div[role="textbox"]');
For some reason it didn't find the control with the field id.
Thanks anyway!
Catatan
Are you talking about a Metadata Control Nintex Forms 2013 ? I am using Office 365 Forms and there aren't Managed Metadata Controls as far as I can see. I have managed metadata columns in my custom list but Nintex Forms ignores them ;-(
Daniel
I'm not clear on how you implemented this in Nintex. Could you provide more detail on the application of the solution?
Thank you.
Ken
Hi Ken,
Here is a very condensed how-to:
6. Save & Publish the form.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.