I have an HTML control that is displaying several fields. The script works when the form is in edit mode, however when the script is in display mode the script does not display the two People picker fields. Do you know what the issue could be on the display form. Below is my code
fd.spRendered(function() {
function hideOrShowDueDate() {
if (fd.field('PerformanceType').value=="Probationary Progress Review") {
// Show the Due Date field
$('.Probation').show();
$('.General').hide();
$('.Leadership').hide();
} else if (fd.field('PerformanceType').value=="Performance Evaluation-Leadership") {
// Show the current table
$('.Leadership').show();
$('.Probation').hide();
$('.General').show();
} else {
// Hide the current table
$('.Leadership').hide();
$('.Probation').hide();
$('.General').show();
}
}
// Calling hideOrShowDueDate when the user changes the Start Date
fd.field('PerformanceType').$on('change',hideOrShowDueDate);
// Calling hideOrShowDueDate on form loading
hideOrShowDueDate();
});
fd.spRendered(function() {
//Info area
$("#Employee").append(fd.field('Employee').value.DisplayText);
$("#Supervisor").append(fd.field('Supervisor').value.DisplayText);
$("#Department").append(fd.field('Department').value);
$("#HireDate").append(fd.field('Hire').value);
$("#Review").append(fd.field('ReviewPeriod').value);
$("#ReviewType").append(fd.field('PerformanceType').value);
$("#JobTitle").append(fd.field('JobTitle').value);
});
fd.pdfOptions = {
paperSize: 'A4',
landscape: false
};