Nintex Forms - connect multiple choice radio button fields so only one choice can be selected

  • 17 August 2016
  • 3 replies
  • 6 views

Badge +2

I have 3 groups of radio buttons that I want only one option to be selected from all of them at any given time.

For example, in the below image, if Faculty - Regular is selected then Operational - Full Time gets selected I need it to deselect Faculty - Regular.

radio.png

The three I need to connect are Faculty, Administration, and the Full Time/Part Time set under Operational.

I am happy to use JavaScript to get this to work


3 replies

Badge +7

Hi Sean,

I don't know any JavaScript to do this.  If I had to make this work, I would use a fourth set of radio buttons with the options (Faculty, Operational, Administration)  Based on the option you select there in this first set, I would use rules to enable the selected radio button set that you already have on the above screen and allow a user to pick one of the options there.  If the user changes his mind to a different option in the main set, I will once again disable to previous selection and enable the new selection.

Hope that makes sense and can help. Let me know if you need further explanation

Badge +10

Hi Sean,

You can use javascript variable for the option control optUrContorl

NWF$('#'+ optUrContorl).find('input[value='Anyvalue']').attr('checked', false);

You can use this check and uncheck option control.

Badge +2

I got it to work. Sojan's answer, while not quite right, helped push me in the right direction.

Here is the javascript code I used, which was duplicated for each radio button set.

NWF$('#'+ FacultyRadio).change(function(){

NWF$('#'+ AdminRadio).find('input[type="radio"]').prop('checked', false);

NWF$('#'+ OperationalRadio).find('input[type="radio"]').prop('checked', false);

});

Reply