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

121
Visualizações
Best way to build a dynamic dropdown on the fly in html/js that is a subset of an original list based on user choices?

Beginner here - thanks for patience and insights. I have a list of 20 items in a googlesheet that forms a 'list' for a drop down in my HTML. I have 4 unique choices out of the 20 that I ask the user to make via 4 different html dropdowns. From this selection process I build an array of the 4 user choices as the dropdowns are used (this is all scripted and working fine currently), which I would then like to be a second, subset list for a fifth dropdown on the same page - is this possible without going server-side/using the googlesheet? Advice welcome on how to start or links to examples I could work through as nothing useful has come up from my searches so far. Some example code below, although not sure if it's really useful as ntg to debug. Thanks.

<div class="row">
  <div class="input-field col s3">
   <select id="m_p1" onchange="getDrawNumOne()">
     <option disabled selected>Choose Player 1</option>
     <?!= list; ?>
   </select>
   <label>Player 1</label>
  </div>
   <div class="input-field col s1">
   <input disabled id="draw1" type="text" class="validate">
   <label for="draw1" class="active">Draw#</label>
  </div>
  <div class="input-field col s3">
   <select id="m_p5" onchange="getDrawNumFive()">
     <option disabled selected>Choose Player 5</option>
     <?!= list; ?>
   </select>
   <label>Player 5</label>
  </div>
   <div class="input-field col s1">
   <input disabled id="draw5" type="text" class="validate">
   <label for="draw5" class="active">Draw#</label>
  </div>
</div>
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