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

295
Views
How to set value of select2 to jquery on query builder?

I am using the Jquery query builder where I am also using the select2 plugin.

The question is when I need to set the values the select2 is not rendering the options, instead is empty even the value is there.

here is the example:

 $('#builder-widgets').queryBuilder({
            // plugins: ['bt-tooltip-errors'],
            filters: [
                {
                    id: 'manufacturers',
                    label: 'Brands',
                    operators: ['in', 'not_in'],
                    type: 'string',
                    multiple: 'multiple',
                    plugin: 'select2',
                    plugin_config: {
                        data: [
                            {
                                id: 1,
                                text: 'xyz'
                            },
                            {
                                id: 2,
                                text: 'abc'
                            }
                        ],
                        width: '500px',
                        tags: true,
                        multiple: true
                    },
                    valueSetter: function (rule, value) {
                        console.log(value)
                    }
                },
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!