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 () {
var fabrikBlock = Fabrik.getBlock('form_XX');
var value = fabrikBlock.formElements.get('tablename___elementname').get('value');
var target = fabrikBlock.formElements.get('tablename___elementname');
if (value == 0) {
target.setValue("y"); // where y is the option value
}
// etc.
});
requirejs(['fab/fabrik'], function () {
var fabrikBlock = Fabrik.getBlock('9');
var value = fabrikBlock.formElements.get('tbl_vehicle___powered_vehicle').get('value');
var target = fabrikBlock.formElements.get('tbl_vehicle___needs_inspections');
if (value == 2) {
target.update('0');
}
});