I have a choice field where multiple items can be selected. There is one instance where if a users selects a Virtual Desktop, they also need to have Remote Access. Is it possible to automatically check Remote Access so the user does not forget that part? Here is the field:
Page 1 / 1
Hi,
Add a CSS class to the choice control as per the below:
Then add the below JavaScript to the form:
NWF$(document).ready(function () {
NWF$('.ChoiceClass inputCtype="checkbox"]').change(function () {
var VirtualDesktop = false;
var RemoteAccess = false;
NWF$('.ChoiceClass input).each(function (index, elem) {
if (NWF$(elem).val() == 'Virtual Desktop') {
VirtualDesktop = true;
}
if (NWF$(elem).val() == 'Remote Access') {
RemoteAccess = true;
}
});
if (VirtualDesktop && !RemoteAccess) {
NWF$('.ChoiceClass inputtype="checkbox"] value="Remote Access"]').prop('checked', 'checked');
}
});
});
Be aware of the hard coded 'Virtual Desktop' and 'Remote Access' (Double check the values please).
Enjoy and keep running on pure Nintex Adrenaline !!!
if you want to avoid javascript, you could just setup a validation rule.
it will not preset choice options, but will not allow a user to submit form if the two required option are both not selected.
validation rule formula might look like
inArray(DeviceChoice,'Virtual Desktop') && not(inArray(DeviceChoice,'Remote Access'))
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.