Reputation: 391
I'm using select to in my app for selecting option from the dropdown. The select2 is implemented on input list I have in a form I want to reset all the form when the user click on cancel.
I try
$(idOfTheForm).trigger(reset)
but the selecting results which display in the inputs are not reset.
Upvotes: 1
Views: 215
Reputation: 984
You can use this code for the reset
$("#select_id").select2("val", "");
Upvotes: 3