Setting Option Buttons in a choice field rendered as buttons

  • 30 March 2017
  • 7 replies
  • 12 views

Badge +3

I have a form, I'd like to setup as tabbed viewing. I have the "Choice" control setup to render as buttons and a javascript variable name of "TabRules".

I want to use a button control, that when it's pressed it goes to the next tab. Presumably, by setting a javascript function that sets it? 

I'm using the following code. 

NWF$('#' + TabRules).find('input:radio[value="Start"]').attr("checked","true");

(Start is one of the values of the choice buttons.) 

What am I missing? Thanks in advance. 


7 replies

Badge +8

Hi ‌,

Have you already checked this Nintex Xchange source?

Cheers,

Rick

Badge +10

Try using this

NWF$('#' + TabRules).attr('checked', true);

Badge +3

Hi Rick.  Yes. I can setup the tab browsing. What i'd like is to have a button at the bottom of the form that says something like, "Save and continue", that will then, using javascript, "change the tab".  (By selecting an item in the choice list.) 

Does that make sense?  

Badge +3

Thank you, Sojan. How would the code above show it what "tab" to move to? 

Badge +4

‌,

Could you provide some screenshots to possibly show what you're trying to achieve?

From what I gather, you have it where you can click any of the tabs up top and that portion of the form will show and now you want it if they click a save or next type button, it will move from say, tab1 to tab2?

Badge +10

You can set a value to a text box control to hold the position of your tab. On button click you can set a value using the have script.

Badge +2

This is what I used.  It clicks the button, which changes everything associated with it in one go:

var objRequestType =NWF$('#' + varRequestType);

objRequestType.find('input:radio[value="'+strCurrentTabName+'"]').click();

"varRequestType" is the ClientID variable set to the Choice control ('render as buttons' selected inside the control).

"strCurrentTabName" is just text of the item I wish to click.

Thanks,

~~Kolten

Reply