Skip to main content

Hi, Guys.

Need help, i have a Multiple-Selection Checkbox (List-Lookup) that i want to check on change of a dropdown.

Can anyone share some javascript code? Thank you.

Control Settings - List Lookup

Display format - Check boxes (Multiple-Selection)

sample values: [3;#Test1,5;#Test2,6;#Test3,8;#Test4,9;#Test5]

i tried these below but no luck

NWF$('#' + chkVal).find('input[value='3;#Test1']').prop("checked", "checked");

NWF$('#' + chkVal).find(':checkboxxvalue='3;#Test1']').attr("checked", "checked");

NWF$('#' + chkVal).find('inputtvalue='Test1']').prop("checked", "checked");

NWF$('#' + chkVal).find(':checkboxovalue='Test1']').attr("checked", "checked");

you haven't specified how exactly do you need or are able to identify single options, but if possible I'd suggest not to rely on text labels but rather on IDs, since labels might be often subject of change.

to set lookup's checkboxes checked something like this should work

NWF$('#' + chkVal).closest(".nf-filler-control").find("[type='checkbox'][value='4'],[value='3'],[value='2']").prop('checked','checked')

this will set checked checkboxes related to lookup IDs = 2, 3, 4


Reply