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

115
Views
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
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!