Hi everyone,
I have this code in 3.js file in components/com_fabrik/js
and this work fine in form but I want do that in details view. So when I change to:
It doesn't work, in debug I have 'field' is "null". What am I doing wrong?
What I want to do is hide the group17_tab in display view when the value of 'sprawa_17_repeat___notatki' in this tab is empty
Cheers, Chris
I have this code in 3.js file in components/com_fabrik/js
JavaScript:
requirejs(['fab/fabrik'], function () {
var formId = 3;
Fabrik.getBlock('form_' + formId, false, function (block) {
var field = block.elements.get('sprawa_17_repeat___notatki_0').get('value');
if (field==''){
document.getElementById('group17_tab').style.display = 'none';
}
});
});
and this work fine in form but I want do that in details view. So when I change to:
JavaScript:
requirejs(['fab/fabrik'], function () {
var formId = 3;
Fabrik.getBlock('details_' + formId, false, function (block) {
var field = block.elements.get('sprawa_17_repeat___notatki_ro_0').get('value');
if (field==''){
document.getElementById('group17_tab').style.display = 'none';
}
});
});
What I want to do is hide the group17_tab in display view when the value of 'sprawa_17_repeat___notatki' in this tab is empty
Cheers, Chris