Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
JQuery selectize.js does not populate with options

I have a Flask application that creates a form which is then manipulated by html and JQuery. For a particular set of multi-select fields in the form, I'm attempting to make the dropdowns searchable using selectize.js. The order of the user's selections are important and the "drag and drop" plug in from selectize.js is exactly what I'm looking for. However, when I try implementing this logic, I'm not able to get the desired behavior in these form fields. The fields are not populating with the options, meaning there is no dropdown. Here is the relevant code snippet -

if (tableMetadata.length > 0) {
     document.getElementById('displayErrorProd').innerHTML = "";
     const options = tableMetadata; //can confirm this produces an array of the desired options
     const items = options.map(x => x[0]);  //can confirm this produces an array of the desired options


     $("#prod_join_key").selectize({
         plugins: ["drag_drop"],
         options: options,
         items: items,
         valueField: options[0],
         labelField: options[0],
         delimiter: ",",
         persist: false,
         sortField: 'text',
         create: function (input) {
            return {
               value: input,
               text: input,
            };
         },
       });

}

Please let me know if any other info is needed in order to debug this. Thanks for our help!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!