Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

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;


};


  • No labels