Using “customNextButton” extension, we are trying to modify behavior of Next button for a Particular Screen of our Policy Modeling project. While validating we have found that the modified behavior of Next Button is replicated for other screens as well which is not our expected behavior because we want to keep default behavior and looks for other screens.
Also we applied screen condition for modified behavior but the modification was visible to all other next screens/stages. Below are the conditions which we used in our JS file:
if(interview.getStages().filter(function (screen) { return screen.caption == "Stage 1" })[0].isCurrent){
if(interview.currentScreen()._screen.config.screen.rawTitle == 'Service Screen2'){
return {
mount: function(el) {
\<code to modify behavior>
}
}
}
}
Please inform me if the above explanation regarding our query is unclear or if you require further information.
Thanks,
Navneet Arora