cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get multiple checked checkbox value in nintex in javascript

This code doesn't seem to be working in javascript:

var c= new Array();

    NWF$('.visibilityClass' + ':checkBox:checked').each(function(i)

{

       c.push(NWF$(this).attr("value));

         alert(c);

    });

or

 

NWF$("#" + chkVisibility).find(':checkbox[value=\'East Florida

CIN\']').attr('checked', 'checked');

 

Any pointers will be helpful

Labels: (1)
0 Kudos
Reply
5 Replies
Automation Master
Automation Master

Re: how to get multiple checked checkbox value in nintex in javascript

Can you try with the following code :

var c = new Array();

NWF$('.visibilityClass input[type="checkbox"]').each(function(i)

{

     if(NWF$(this).prop('checked')) {

          c.push(NWF$(this).attr("value"));

          alert(c);

     }

});

Hope this helps

Reply
aden
Nintex Newbie

Re: how to get multiple checked checkbox value in nintex in javascript

Hi Anyone please.

What is the name of the check control from this code please?

I have a choice control. It allows multiple selections. Lets say 'A', 'B', 'C'

I have to apply a rule to validate a hyperlink control to make sure the hyperlink control is not empty if 'A' is selected alone or among the selections.

Any help will be appreciated

Thanks

0 Kudos
Reply
Automation Master
Automation Master

Re: how to get multiple checked checkbox value in nintex in javascript

Hi David,

I think that you can achieve that without javascript code.

You can add a validation rule to your form and check the value of your choice control : if it contains A and the hyperlink is empty then the hyperlink control is invalid.

Hope this helps

0 Kudos
Reply
joseph_cervi
Nintex Newbie

Re: how to get multiple checked checkbox value in nintex in javascript

Caroline, This is working for me.  Thank-you, -JC

Reply
Automation Master
Automation Master

Re: how to get multiple checked checkbox value in nintex in javascript

I'm glad I could help. Thanks for your feedback

0 Kudos
Reply