AEMaaCS | AEM Forms | Using globals.functions comes back as undefined
Hello!
I’m trying to follow the documentation provided here :
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/adaptive-forms-authoring/authoring-adaptive-forms-core-components/create-an-adaptive-form-on-forms-cs/create-and-use-custom-function-core-component/custom-function-core-component-scope-function
Essentially I’m attempting to set the property of a field to either being valid or invalid depending on its content and then validating it.
I’m attempting to call : globals.functions.setProperty(field, {valid: true}), as well as globals.functions.validate(field) but neither seem to be working.
In order to try and figure out why I’m encountering this issue, I’ve added some console.logs at various levels of my code and I’ve noticed that if I attempt to log globals.functions, it comes back as undefined.
This seems to be the crux of my issue since I obviously can’t call global functions if they aren’t defined, but I was under the impression this was part of aem core components so I’m unsure what I am missing.
Any help would be greatly appreciated.