Populate Managed meta data field value in list forms
HTML
"<input id="SubSiteDepartment_$input" type="hidden" value="Legal|8cff44c0-ef8d-4777-bb8b-e109a4aed871" />"
Script
$("input[id^='SubSiteDepartment']").val("Legal|8cff44c0-ef8d-4777-bb8b-e109a4aed871")
Here the logic is for every managed metadata field it will have a hidden field with fildname starting u just need to update the value in the format of "value|GUID"
"<input id="SubSiteDepartment_$input" type="hidden" value="Legal|8cff44c0-ef8d-4777-bb8b-e109a4aed871" />"
Script
$("input[id^='SubSiteDepartment']").val("Legal|8cff44c0-ef8d-4777-bb8b-e109a4aed871")
Here the logic is for every managed metadata field it will have a hidden field with fildname starting u just need to update the value in the format of "value|GUID"
Comments