This commit is contained in:
2021-08-06 15:42:56 +00:00
parent b14ef83df2
commit b145c6af0a
3 changed files with 23 additions and 31 deletions

View File

@@ -747,8 +747,9 @@ export default {
}
}
let template =
const template =
window.$gz.store.state.formCustomTemplate[vm.formCustomTemplateKey];
if (template === undefined) {
return true;
}
@@ -756,10 +757,15 @@ export default {
//this is a collection of both custom field definitions and standard form fields that are required
//since all names are unique can just filter out the one we need by name which will inherently ignore custom fields by default
let templateItem = template.find(
const templateItem = template.find(
z => z.fld.toLowerCase() == formCustomTemplateFieldName.toLowerCase()
);
if (window.$gz.dev && !templateItem) {
console.log(
`DEV ERROR: FORM FIELD NOT IN TEMPLATE: "${formCustomTemplateFieldName}"`
);
}
if (templateItem === undefined || templateItem.hide !== true) {
return true;
}