Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

349
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda