Next/Previous buttons on a Nintex form

  • 17 October 2019
  • 2 replies
  • 33 views

Badge

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.

 

5000i60AD92D4ED926276.png5001i42CC27439F684BFD.png

5002i7955F2B4AD6CFD15.png5003i0BFCAB35019BCF26.png5004i08191469D452FFB1.png5005iAF2FF21C35C8916C.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;
}
}


2 replies

Userlevel 6
Badge +22
Hi,
Nintex uses a custom implementation of jQuery which is NWF$ instead of $.
Badge +3

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

Reply