cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
whitmanj4
Nintex Newbie

Reset Dropdown list using JavaScript

Jump to solution

In Nintex 2013 form, I want to use a button using JavaScript to reset several dropdown lists containing corporate departments.  I have searched for examples but nothing works.

0 Kudos
Reply
3 Replies
chaddavis
Nintex Newbie

Re: Reset Dropdown list using JavaScript

Jump to solution

To reset a drop down control with a button, you can use the following process:

Form Layout:

Choice Control Settings:

Button Control Settings:

JavaScript Code in Form Settings:

Code:

function ddClear() {
NWF$('.ddClass').val('**SelectValue**');
}

End Result when Button is Clicked:

Explanation:

Since the code is using a CSS class (ddClass), you can apply that same class to all drop down controls and they will all clear at the same time when the button is clicked once.

0 Kudos
Reply
chaddavis
Nintex Newbie

Re: Reset Dropdown list using JavaScript

Jump to solution

As long as the other drop downs do not have the Control CSS Class of ddClass set (see below), they won't be affected by the Clear Button.

Simply leave that field blank on the drop downs you don't want cleared.

Reply
whitmanj4
Nintex Newbie

Re: Reset Dropdown list using JavaScript

Jump to solution

Thank you this does work perfectly, once I put the ddclass only in the dropdown lists I need cleared.

0 Kudos
Reply