Hi, I have changed the code to my field names and it hasn't worked.
I want to show the 'Termination Wizard' when 'is the employee leaving' is a YES. IF the answer is 'No' I want the 'Termination Wizard' to be hidden.
fd.spRendered(function() {
function showOrHideResolvedStep(resolvedTab) {
if (fd.field('Is_x0020_the_x0020_employee_x0020').value == 'Yes' && resolvedTab !== null) {
//show the second step, in our case Termiantion_Details
fd.container('Wizard0').widget.tabs.splice(1, 0, tab3);
}
if(fd.field('Is_x0020_the_x0020_employee_x0020').value != 'No') {
//hide the second section, in our case Termiantion_Details
fd.container('Wizard0').widget.tabs.splice(1, 1);
}
}
fd.spRendered(function() {
var resolvedTab = fd.container('Wizard0').widget.tabs[1];
//call showOrHideTerminaion_DetailsStep when a user changes the status
fd.field('Is_x0020_the_x0020_employee_x0020').$on('change',function() {
showOrHideResolvedStep(resolvedTab);
});
//call showOrHideResolvedStep on form load
showOrHideResolvedStep(resolvedTab);
});
Please please all code within one spRendered event handler. Also check the control internal names, as the Wizard0 is the name of the control from the article.
Then, check the browser console for the errors and share the screenshot.