I know you're going to say to need to see the site, but it's on an Intranet so I can't show you. But I've been banging my head against this for days.
I want to use an external js file (in my case, 295.js). I have wrapped my functions (currently just alert with the value of the element) in the code suggested here: http://fabrikar.com/forums/index.php?wiki/javascript/ to ensure fabrik.js is loaded and that it will function on new or edit. But I am getting an error: "TypeError: Fabrik is undefined."
I've also tried just:
which results in this error: TypeError: Fabrik.getBlock(...).elements is undefined
What am I missing here? It's like it's not loading Fabrik.js.
I am not very strong with javascript. I'm at my wit's end. Any help is appreciated. FWIW, I notice my subscription likely ran out in March; I will see about that.
Best,
K
I want to use an external js file (in my case, 295.js). I have wrapped my functions (currently just alert with the value of the element) in the code suggested here: http://fabrikar.com/forums/index.php?wiki/javascript/ to ensure fabrik.js is loaded and that it will function on new or edit. But I am getting an error: "TypeError: Fabrik is undefined."
I've also tried just:
JavaScript:
requirejs(['fab/fabrik'], function () {
var name = Fabrik.getBlock('form_295').elements.get('inoutperson___io_type_raw');
alert(name);
});
which results in this error: TypeError: Fabrik.getBlock(...).elements is undefined
What am I missing here? It's like it's not loading Fabrik.js.
I am not very strong with javascript. I'm at my wit's end. Any help is appreciated. FWIW, I notice my subscription likely ran out in March; I will see about that.
Best,
K