Boolean and Multi line text
Posted: 09 Jan 2018
I need help with some boolean variable.
I would like to query for edit for if a boolean field is Yes or No.
If Yes, then set some fields to read only. I have done something like the following but still not working for me
var fieldName = fd.field('booleanField').value();
if (fieldName == 1){
fd.field('readOnlyField1').readonly(true);
fd.field('readOnlyField2').readonly(true);
}
The second question is I have a Enhanced rich text field that I also need to query on submit to make sure it is not empty. If the field is empty then I alert the user to make sure the field is not empty.
fd.onsubmit(function() {
var resolution = fd.field('Resolution').value();
if (resolution == '' && status == 'Completed') {
if (!fd.field(resolution).value()) {
alert('Resolution cannot be empty');
return false;
}
}
return true;
});
The resolution field is the enhanced rich text and this is not working for me.
Thanks for your help
I would like to query for edit for if a boolean field is Yes or No.
If Yes, then set some fields to read only. I have done something like the following but still not working for me
var fieldName = fd.field('booleanField').value();
if (fieldName == 1){
fd.field('readOnlyField1').readonly(true);
fd.field('readOnlyField2').readonly(true);
}
The second question is I have a Enhanced rich text field that I also need to query on submit to make sure it is not empty. If the field is empty then I alert the user to make sure the field is not empty.
fd.onsubmit(function() {
var resolution = fd.field('Resolution').value();
if (resolution == '' && status == 'Completed') {
if (!fd.field(resolution).value()) {
alert('Resolution cannot be empty');
return false;
}
}
return true;
});
The resolution field is the enhanced rich text and this is not working for me.
Thanks for your help