For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
requirejs(['fab/fabrik'], function () {
Fabrik.getBlock('form_1').elements.each(function(element) {
if (element.options.editable === false) {
element.update('<a href="">Login</a> or <a href="">Register</a> to View');
}
});
});
So say your form ID is 1 you should have a file in components/com_fabrik/js/form_1.js, with the code I posted previouslyCustom javascript files should be located in:
/components/com_fabrik/js
.....
Fabrik 3.1 onwards:
.......
For form views your file should be still be form_X.js where X is the form's id.
I don't care to make my sites public, but I do appreciate the offer, thanks.I'd have to see your site to know why it's not working, but your "My Sites" doesn't seem to be filled out.
Is there anything else I need to do to make fabrik recognize that there is js to be loaded? A button somewhere in the list or form? I only want this message to show up for the public, registered users and editors should be able to see it.Looking at Rob's code, it should track the edit ACL status (Form access) of the element, so if they don't ave edit access, they'll see that msg.
No there's nothing else you need to do beyond what is in the documentation, we simply check for the file, if its present we load it, and its run automatically.Is there anything else I need to do to make fabrik recognize that there is js to be loaded?