Managed Metadata column required
-
- Posts: 4
- Joined: Wed Feb 26, 2020
I am having trouble setting a managed metadata column (name: key industry) required on submit --- I am using the below (which has worked before in other field types). Just need a basic on submit check --- cannot set it on the list as required due to other technical reasons. Any help would be appreciated. Thanks!
fd.onsubmit(function () {
if fd.field('KeyIndustry').value() == '') {
alert('Please, fill in key industry');
return false;
}
}
fd.onsubmit(function () {
if fd.field('KeyIndustry').value() == '') {
alert('Please, fill in key industry');
return false;
}
}
Hello asharma190,
There are typos in your code, please see updated code:
Also, if 'KeyIndustry' is Managed Metadata field, use this code to check if it has value:
There are typos in your code, please see updated code:
Code: Select all
fd.onsubmit(function () {
if (fd.field('KeyIndustry').value() == '') {
alert('Please, fill in key industry');
return false;
}
return true;
});
Code: Select all
fd.field('FieldName').control()._el().find('.ms-taxonomy .valid-text').length == 0
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests