hi @kgiles, Hope that you are doing well!
The code is correct however you will need an event to trigger the code. You did not specify the event.
The triggering event is a Change to the "Specialty" dropdown list.
Client ID JavaScript variable name = "Specialty"
Each time the Specialty value is changes, all the checkbox shall be selected
NWF$(document).ready(function () {
NWF$('#' + Specialty).change(function () {
NWF$('#' + emailID + ' input:checkbox').prop('checked', true);
});
});
Hope that helps
Thank you for your assistance! I'm still getting the same result.
1. I've set both my variables:
Entered what you sent me:
But on change of Specialty, the check boxes are still not selecting all:
Note, I know you know, but just in case, "emailID" is a filtered field based off of "Specialty"
Thanks again!
Run this quick test
Add another dropdown control -JavaScriptID: Demo - on your form
Demo has the default "Option1, Option2, Option3" values
Swap the trigger from Specialty to Demo. Update code.
NWF$(document).ready(function () {
NWF$("#" + Demo).change(function () {
NWF$('#' + emailID+ ' input:checkbox').prop('checked', true);
});
});
When you preview,
1. Change the Specialty. Give it 1 sec to load the Emails
2. Change Demo. Does it select all the checkbox?
Sorry, I'm not understanding.
What I meant. - Will changing Demo selection, select all the checkbox
Just gave this a shot. Sorry for the delayed response.
1. Added a new drop down and gave it the Java ID "Demo"
2. Double checked my check box name, it has Java ID "emailID"
2. Plugged in the code you sent me > Settings > Custom JavaScript
3. Ran the form > Selected Specialty > Cascading check boxes, "emailID" populated with the appropriate emails > selected something from "Demo" > no check all occurred with "emailID".
I'm sure this is getting frustrating. Thank you for all your help. Not sure if I mentioned but this is a Classic Form Nintex 2013
@Garrett - I am trying to attempt something similar - this code is working great for me - however,
I am trying to have specific choice fields drive my default multi selects. Details below:
Here are my three fields:
Request type (Choice - Radio button): New, Access
User Type: (Choice - drop-down): internal 1 , internal 2, external 1, external 2
Account types (Choice - multiselect) : SW1, SW2, SW3, SW4, SW5
If Request type = New
AND
IF User type = Internal 1 OR Internal 2
THEN
auto select Account Types = SW1 and SW 2 and SW 3
Any assistance would be greatly appreciated :)
I have a filtered Multi Select Check Box. I would like all the check boxes to be selected whenever this field changes.
In this instance, someone would select from a drop down Cardiac and all the Cardiac email contacts would populate. I just need them all the be selected on load.
This is the javascript I used to no avail. Please and thank you!
NWF$('#' + emailID+ ' input:checkbox').prop('checked', true);
Is the Multi Select Check Box a Lookup Control that is set to Checkbox and is being filtered on the value from the Specialty dropdown control?
If so then normal event handlers aren’t going to work here which is perhaps why you’ve been having issues. Let me know.
Hi @MegaJerk
No look ups! just a regular old multi select choice :)
Thank you!
Hi @MegaJerk
No look ups! just a regular old multi select choice :)
Thank you!
When I originally replied to this thread it was because I was attempting to answer the main topic post, however I see that it’s very dated and was resurrected by activity. I advise you to please make a new post on the forums (you can tag me) so that your solution is kept separate from the above issue which may not have the same answer as what you need in your case.
apologies @MegaJerk - I see now you weren't responding to me - I did create a new thread here - Setting Multi-select value based off of 2 drop down values | Community (nintex.com)