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

344
Views
Select2 element not behaving correctly

So I’m using the select2 library for my drop down search list now my issue is that it’s not actually letting me select any of the options and no tutorial is able to help me do what I need to do. Which is when I click on the drop down box and find the option I want, once I click that option it should display in that drop down box.

This is what I have code wise so far:

<select id=“select_field”>
<?php 
      foreach($options[‘values’] as $option){
         echo ‘<option value=“‘.$option[‘id’].’”>’.$option[‘name’].’</option>’;
   }
?>
</select>

<script type=“text/javascript”>


$(document).ready(function(){
$(‘#select_field).select2({});
});

</script>

So I’m not sure what exactly I’m missing to make the option selectable? Any help will be appreciated and I know the speech marks are wrong but I’m writing this up on my ipad

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!