1

I'm using selectize this tool that let's me make a select field searchable. The thing though is I can't select an option, useful when editing existing data.

The code looks like this to instantiate selectize

$('#vendor').selectize({
    sortField: 'text'
});

I can select something then find it's value on the console using $('#vendor').val(); but after refreshing and doing $('#vendor').val('21'); which is the value I got back, it doesn't select the option.

This normally works on a normal select field.

Sam B.
  • 2,703
  • 8
  • 40
  • 78
  • So found a question that answers this: https://stackoverflow.com/questions/21962124/how-to-set-a-value-for-a-selectize-js-input – Sam B. Sep 23 '19 at 08:01

0 Answers0