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
Solved! Go 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.
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?
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.
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;
}
})
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:
????
hi Harry Riyait, I've just posted a working example in your other post here -
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.
so good luck
let us know your progress.