cancel
Showing results for 
Search instead for 
Did you mean: 
slwhite63
Nintex Newbie

How do I get a check box checked based on selection of a dropdown

Jump to solution

I have a dropdown on a form with three choices. Let's say the dropdowns are gifts

1. 65" TV

2. Wine

3. 1962 Chevy Nova

What I would like is based on the choice a check box on the form is automatically selected.

The check boxes could be:

Best Buy

Costco

CarsforSale.com

Tags (2)
0 Kudos
Reply
9 Replies
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

For each checkbox, you'd need an "IF" rule, where you'd basically say "if DROPDOWN == 65" TV" then what to do if TRUE "{self}==true", what to do if FALSE, "{self}==false"

so it would look like if(DropDown1=="65" TV", {Self}==true, {Self}==false)

I may be incorrect on the ==true ==false bit, as I can't test at the moment. 

0 Kudos
Reply
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

this can only be achived with javascript.

however to provide any useful hint it's important to know

- if the dropdown backed by choice field or by lookup field?

- checkboxes are 3 single yes-no controls or are they checkboxes for choice field or lookup field? can on single checkbox be checked at a time or multiple selections are allowed as well?

0 Kudos
Reply
slwhite63
Nintex Newbie

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

The drop down is a choice field.

The check boxes are just yes/no controls.

As this is a yes/no it is a single selection.

0 Kudos
Reply
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

then following might be an example how to make yes/no checkboxes checked based on choice selection

varXXXXX are javascript variables for respective controls.

NWF$('#'+varGifts).change(function(evt){
    switch(evt.target.value){
        case '65" TV' :
            NWF$('#'+varCBBestBuy).prop('checked',NWF$(evt.target).prop('checked'));
            break;
        case 'Wine':
            NWF$('#'+varCBCostCO).prop('checked',NWF$(evt.target).prop('checked'));
            break;
         case '1962 Chevy Nova':
            NWF$('#'+varCBCarsForSale).prop('checked',NWF$(evt.target).prop('checked'));
            break;
         default:
            //no gift
            break;
     }
})
Reply
harryr
Nintex Newbie

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

I have a similar issue and not a JavaScript expert.

I want to do the same but with drop-down menus on the same form that are not lookup of other lists.

=================================================================

Example:

Drop-down menu A: Creature

Choices: Man, Dog, Spider

 

Drop-down menu B: Species

Choices: Human, Canine, Arachnid

 

When a user selects Man in menu A,  menu B auto-populates as Human. 

When a user selects Dog in menu A,  menu B auto-populates as Canine. 

When a user selects Spider in menu A,  menu B auto-populates as Arachnid. 

=================================================================

How would I writ this and where would I put it?

My initial attempt is:

if (creature == "man") {
   species == "human"
}

????

0 Kudos
Reply
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

hi Harry Riyait‌, I've just posted a working example in your other post here -  

0 Kudos
Reply
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

hi ‌, were you able to resolve your issue?

0 Kudos
Reply
slwhite63
Nintex Newbie

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

I have not been able to get this to work as of yet. Still trying. Right now I will take getting a single check box checked on a pull down selection.

0 Kudos
Reply
Automation Master
Automation Master

Re: How do I get a check box checked based on selection of a dropdown

Jump to solution

so good luck

let us know your progress.

Reply