Display Form does not display comments
Posted: 29 Mar 2017
Hi,
I have the following script on my display form but it is not displaying the comments as per the choices selected:
Shorter version of the query:
// Enable or disable 'Comment Fields'
function setComment() {
var a = fd.field('Engine_x0020_Oil_x0020_Level').control()._el().text();
var b = fd.field('Fluid_x0020_Leaks').control()._el().text();
// set the priority index for 'a'
if (a == '0') {
$('.C1').show(); // Enable
}
else {
$('.C1').hide(); // Disable
}
// Priority index for b
if (b == '0') {
$('.C2').show(); // Enable
}
else {
$('.C2').hide(); // Disable
}
}
// Subscribe on status change
fd.field('Engine_x0020_Oil_x0020_Level').control().change(function () {
setComment();
});
fd.field('Fluid_x0020_Leaks').control().change(function () {
setComment();
});
// Initialize
setComment();
On new and edit forms i am using these fields and they work fine:
fd.field('Engine_x0020_Oil_x0020_Level').control().value();
I want to display the comments where the action required (0) is selected and a comment is left.
Can you please tell me why am I not seeing the comments on the display side.
Thanks,
Mariam
I have the following script on my display form but it is not displaying the comments as per the choices selected:
Shorter version of the query:
// Enable or disable 'Comment Fields'
function setComment() {
var a = fd.field('Engine_x0020_Oil_x0020_Level').control()._el().text();
var b = fd.field('Fluid_x0020_Leaks').control()._el().text();
// set the priority index for 'a'
if (a == '0') {
$('.C1').show(); // Enable
}
else {
$('.C1').hide(); // Disable
}
// Priority index for b
if (b == '0') {
$('.C2').show(); // Enable
}
else {
$('.C2').hide(); // Disable
}
}
// Subscribe on status change
fd.field('Engine_x0020_Oil_x0020_Level').control().change(function () {
setComment();
});
fd.field('Fluid_x0020_Leaks').control().change(function () {
setComment();
});
// Initialize
setComment();
On new and edit forms i am using these fields and they work fine:
fd.field('Engine_x0020_Oil_x0020_Level').control().value();
I want to display the comments where the action required (0) is selected and a comment is left.
Can you please tell me why am I not seeing the comments on the display side.
Thanks,
Mariam