Reset Multi-Value list lookup control using JavaScript

  • 26 August 2016
  • 3 replies
  • 29 views

Badge +3

Hello Everyone

I am currently working on Nintex Form where I want to reset Multi select list lookup control. On the form I have a Reset button. When user clicks Reset button I have to reset all controls on the form. I can reset all the controls using JavaScript but not sure how do I go about resetting multi-select List Lookup. I came across an example where using JavaScript we can set the default value for the multi-select list lookup but in my case I would need to do the reverse of that. https://community.nintex.com/thread/10276

Thank you in advance for your help.


3 replies

Userlevel 5
Badge +14

I haven't tested it but I would say first line of code on the link provided actually clears all the selected options

NWF$(".multiChoice option:selected").removeAttr("selected");

Badge

Hello,

You can achieve this by following step:-

1. Add multiChoice class to the multi select control from setting.

2. Call following script from button to remove all selected items.

NWF$(".multiChoice option").each(function() {
$(this).prop("selected", true);
})
NWF$(".multiChoice button:nth-child(2)").click();

I hope this will help you.

Thanks & Regards,

-Samit

Badge +2

None of the above options worked for me to reset the multi lookup column in Nintex form 2013.

Is there any other way to achieve it.

Please help.

Reply