claudiaurbanski
Nintex Newbie

Help with choice check/uncheck js

Jump to solution

I have 4 different choice controls Network devices, Printers, AS, Internet Connections (showing as tabs) to show 4  panels with hide control rules. The idea is when a choice is selected to automatically uncheck the other 3 so we only have one panel showing at the time. Any help if someone had a similar scenario. 

Can't seem to get it to work.

claudiaurbanski_0-1617803322574.png

NWF$(document).ready(function()
{
var choice = NWF$("#" +Tab1);
choice.change(function()
{
NWF$("#" + Tab2 ).prop("checked",false);
NWF$("#" + Tab3 ).prop("checked",false);
NWF$("#" + Tab4 ).prop("checked",false);
} );
} );

 

0 Kudos
Reply
3 Replies
Aleximo
Nintex Newbie

Re: Help with choice check/uncheck js

Jump to solution
0 Kudos
Reply
claudiaurbanski
Nintex Newbie

Re: Help with choice check/uncheck js

Jump to solution
Thank you for the suggestion @Aleximo , however it is not what I was looking for.
0 Kudos
Reply
claudiaurbanski
Nintex Newbie

Re: Help with choice check/uncheck js

Jump to solution
I was able to solve it with the following script



NWF$(document).ready(function () {
var checkedno= NWF$("#" + Tab1);
checkedno.change(function(){
NWF$('#'+Tab2).prop('checked', false)
});
});


NWF$('#' + Tab1).change(function(){
NWF$('#' + Tab2 + ' input').prop('checked',false);
NWF$('#' + Tab3 + ' input').prop('checked',false);
NWF$('#' + Tab4 + ' input').prop('checked',false);
});

NWF$('#' + Tab2).change(function(){
NWF$('#' + Tab1 + ' input').prop('checked',false);
NWF$('#' + Tab3 + ' input').prop('checked',false);
NWF$('#' + Tab4 + ' input').prop('checked',false);
});

NWF$('#' + Tab3).change(function(){
NWF$('#' + Tab2 + ' input').prop('checked',false);
NWF$('#' + Tab1 + ' input').prop('checked',false);
NWF$('#' + Tab4 + ' input').prop('checked',false);
});

NWF$('#' + Tab4).change(function(){
NWF$('#' + Tab2 + ' input').prop('checked',false);
NWF$('#' + Tab3 + ' input').prop('checked',false);
NWF$('#' + Tab1 + ' input').prop('checked',false);
});

View solution in original post

0 Kudos
Reply