This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user