Hello
I am just trying our Plumsail Forms for Sharepoint Online.
I have managed to use the following Javascript to show/hide a field depending on if another field is True/False
fd.spRendered(function() {
function hideOrShowDateofBirth() {
if (fd.field('Under25_x003f_').value === true) {
$(fd.field('DateofBirth').$parent.$el).show();
} else {
$(fd.field('DateofBirth').$parent.$el).hide();
}
}
fd.field('Under25_x003f_').$on('change',hideOrShowDateofBirth);
hideOrShowDateofBirth();
});
However I have a further True/False field where I want to show/hide a DataTable Control and am struggling. I have tried the following Javascript
fd.spRendered(function() {
function hideOrShowConvictionsTable() {
if (fd.field('ConvictionsQuestion').value === true) {
$(fd.control('ConvictionsTable').$parent.$el).show();
} else {
$(fd.control('ConvictionsTable').$parent.$el).hide();
}
}
});
Anyone got any ideas what I have done wrong.
TIA
Stuart