/
Wizard Page Decision Making
Wizard Page Decision Making
Below is an sample of decision making for the progression onto the next wizard page based on a radio button input. This could be easily adaptable for any other type of fields.
The wizard pages are referenced by name in the code.
$.njDialerPlugin.getPage('${NjWizardPageName}').onPageNext = function(page,defaultNextPage) { // default to stay on current page if no button selected var nextPage = page; // get the value of the field var donationQuery = $.njDialerPlugin.getFieldValue("DonationQuery"); // decision based on field value if (donationQuery == "already_help_other_charities") nextPage = $.njDialerPlugin.getPage("Already Help"); else if (donationQuery == "not_sure_giving_cc_details") nextPage = $.njDialerPlugin.getPage("Not Sure Giving CC"); else if (donationQuery == "how_do_you_help") nextPage = $.njDialerPlugin.getPage("How Do You Help"); else if (donationQuery == "how_different_from_other_charities") nextPage = $.njDialerPlugin.getPage("How Different"); else if (donationQuery == "do_you_receive_gvmnt_support") nextPage = $.njDialerPlugin.getPage("Receive Gvmnt Support"); else alert("Please select a customer query from one of the choices listed"); return nextPage; };
A more stream lined process that will hook a drop list to a matching wizard page having a page name same as the drop list value
$.njDialerPlugin.getPage('${NjWizardPageName}').onPageNext = function(page,defaultNextPage) { var nextPage = page; var donationQuery = $.njDialerPlugin.getFieldValue("DonationQuery"); // Check if a value is selected in drop list if (donationQuery != "" ) { // Check if wizard page exist and set next page if ($.njDialerPlugin.getPage(donationQuery)) nextPage = $.njDialerPlugin.getPage(donationQuery); } else alert("Please select customer query from one of the choices listed"); return nextPage; };
Related content
05.5.4 Field Validation
05.5.4 Field Validation
More like this
05.5. Javascript Editor
05.5. Javascript Editor
More like this
Westpac Payment Gateway
Westpac Payment Gateway
More like this
Action buttons
Action buttons
More like this
Screen Layout Action Scripts
Screen Layout Action Scripts
More like this
5.4.3 On Call Phase
5.4.3 On Call Phase
More like this