mameluxen
Novice

Next/Previous buttons on a Nintex form

Jump to solution

I feel like I'm missing something simple... I'm trying to use Next and Previous javascript buttons on my form to switch between tabs (choice field rendered as button). However, on button click, my page looks like it reloads and does not actually execute the switch tab function. My javascript file is referenced via the Nintex form settings, but for the sake of ease, I will be pasting it directly into here. Any help would be much apprecaited. Thank you.

 

tabbutton1.pngtabbutton2.png

nextbutton1.pngnextbutton2.pngpreviousbutton1.pngpreviousbutton2.png

 

function PreviousTab() {
var curTab = $("#" + TabSelection + " input:checked").attr("value");
switch (curTab) {
case "Tab1":
$("#" + TabSelection + " input[value='Tab4']").click();
break;
case "Tab2":
$("#" + TabSelection + " input[value='Tab1']").click();
break;
case "Tab3":
$("#" + TabSelection + " input[value='Tab2']").click();
break;
case "Tab4":
$("#" + TabSelection + " input[value='Tab3']").click();
break;
}
}

function NextTab() {
var curTab = $("#" + TabSelection + " input:checked").attr("value");
switch (curTab) {
case "Tab1":
$("#" + TabSelection + " input[value='Tab2']").click();
break;
case "Tab2":
$("#" + TabSelection + " input[value='Tab3']").click();
break;
case "Tab3":
$("#" + TabSelection + " input[value='Tab4']").click();
break;
case "Tab4":
$("#" + TabSelection + " input[value='Tab1']").click();
break;
}
}

Reply
2 Replies
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Next/Previous buttons on a Nintex form

Jump to solution
Hi,
Nintex uses a custom implementation of jQuery which is NWF$ instead of $.
Reply
Nintex_Man
Apprentice

Re: Next/Previous buttons on a Nintex form

Jump to solution

When changing '$' to 'NWF$' this example worked like a charm for me, thank you!

Reply