I was wondering if I hit a known issue and if somebody else who experienced it might have found a solution.
I am displaying a Fabrik form in a module and providing a JavaScript form_8.js file for some client-side logic. It all works perfectly if I use the form as a component. As soon as I put it in a module elements is undefined, in fact Fabrik.blocks is an empty object. Am I missing anything or did I just found a bug?
Thank you!
I am displaying a Fabrik form in a module and providing a JavaScript form_8.js file for some client-side logic. It all works perfectly if I use the form as a component. As soon as I put it in a module elements is undefined, in fact Fabrik.blocks is an empty object. Am I missing anything or did I just found a bug?
Thank you!
Code:
requirejs(['fab/fabrik'], function () {
elements = Fabrik.getBlock('form_8').elements;
//elements is undefined only when the form is displayed in a module, component works perfectly fine.
...
});