hi All,
may i know how can i select a different tab when i click on a button (client click).
example, in my form i got 3 tabs (Tab A, Tab B and Tab C).
in Tab A, if i click on 'Next' button, i want to go to Tab B.
thanks
hi All,
may i know how can i select a different tab when i click on a button (client click).
example, in my form i got 3 tabs (Tab A, Tab B and Tab C).
in Tab A, if i click on 'Next' button, i want to go to Tab B.
thanks
hi Marian,
its not fully working, the panel of the desired tab show correctly but the option button still remain as the old selection.
eg.
By default Section A is selected, when i click on 'Next' button, the panel changed to Section B's panel. but the selection on the option buttons still remain as Section A instead of Section B. Do you have any suggestion ?
here is my javascript function
function showtab(sectionid){ var rad = NWF$('#' + Section);
rad.find('input')[sectionid].checked = true;
NWF.FormFiller.Functions.ProcessOnChange(rad);
}
Thanks
what type of control do you use for tab buttons?
can you post its configuration?
Hi Marian,
i am using “checkbox - option buttons” in the nontex form.
thanks
I guess you meant "Choice - option buttons", right?
do you render it as radio or buttons.
Yes Marian, i render as buttons.
but default, Section A is selected ('the background changed to white color, other tabs is grey'.)
and when i click on next button using the javascript function above, the panel of the tab show correctly, but the selected tab still remain as Section A (it supposed changed to Section B as well).
thanks
Hi All,
please find image below to understand more about my current problem.
thanks
then try following code
function showtab(sectionid){
var rad = NWF$('#' + Section);
NWF$(rad.find('label')ssectionid]).click();
}
option buttons rendered as buttons tab like functionality
hi Marian,
yes, this is working.
thanks alot
Hi Marian,
I have a similar problem with 3 tabs and a "Next Section" JavaScript Button that should activate the next tab.
Is your code above intended to be entered in the Client Click section of the button? Can you explain sectionid and section in a bit more detail? My Tabs are storing their Client ID in a JavaScript variable named varFormTabs. How is this variable used in your code?
Thanks for your help!
Best regards,
Harald
Is your code above intended to be entered in the Client Click section of the button?
no, it should be placed into form setting - custom javascript, or stored in a separate .js file somwhere on sharepoint and linked to form in form settings - avanced
Can you explain sectionid and section in a bit more detail?
I just taken over John's naming.
but Section is javascript variable of tab switching control (equivalent of your varFormTabs) and sectionid is zero based sequential number of a tab/button.
Hi Marian,
thank you for your answer. I am still facing some issues setting it up.
I inserted the function into the custom JavaScrip section of the form settings as follows:
function showtab(varFormTabs){
var rad = NWF$('#' + Section);
NWF$(rad.find('label')nvarFormTabs]).click();
}
And then I am calling the function from the Client click section of the JavaScript button as follows:
showtab()
But when I test it after publishing the form, the form just reloads and displays the default panel - which is an indicator for an error in the JavaScript. I don't have a lot of experience with JavaScript. Could you help me getting this to work?
Thanks a lot!
Harald
, please start new question for your specific problem.
this question thread is already closed and it might get confusing discussing several problems at one place.
Thanks this was super helpful. My tab button had a forward slash/special character in it ("/") and would not work on load out of the box (had it working fine with other labels).
Here's my example which works on page load (added into a JS file in the style library so I can easily debug it, and then added into the custom JS includes), hopefully adds some more context for people.
NWF.FormFiller.Events.RegisterAfterReady(function () {
var tabControlButtons = NWF$('#' + tabButtons); // tabButtons = the clientID I gave my tab control
NWF$(tabControlButtons.find('label')l0]).click(); // leave label, this is looking for all HTML labels produced by the Nintex form inside the tab control, in this case the labels are our choices that we put into the tab control. The index after it then selects which label you want out of the number of options you put on your control, in my case I wanted to load the first tab by default on load.
});
I don't see anywhere in the thread what to put in the "Client click" field of the button. If I leave it blank I get an error: The "Client click" property is required when "Button Action" is "JavaScript. Thank you.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.