I have a form from which I would like to copy some default values into the inputs. The form inputs are using the selectize.js plugin. I would like to set some of the form values programatically. The standard way of doing this:
$("#my_input").val("My Default Value");
does not work.
I have tried something like this but it does not work either.
var $select = $("#my_input").selectize();
var selectize = $select[0].selectize;
selectize.setValue("My Default Value");
Any ideas? It's got to be easy :) I'm missing it.