0

Like i said in the title i want to keep a list hidden until another another list above has been selected, for example show student list after a class had been selected (so only student who belong to the selected class are shown)

<select name="class">
   <option value="">class1</option>
   <option value="">class2</option>
</select>

<select name="student">
  <option value="">student1</option>
  <option value="">student2</option>
</select>
user3564550
  • 23
  • 1
  • 7
  • Possible duplicate of [Proper way to make HTML nested list?](https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list) – Remy Jan 23 '19 at 09:25
  • depending on the data, you can tackle this in many ways, your question is too broad though. if its from the table you could query based on the first input and so on – Kevin Jan 23 '19 at 09:27
  • I think that thread is about html
  • and
      lists and my issue is with
  • – user3564550 Jan 23 '19 at 09:27
  • Ghost, i thought about that but if i query based on the first one than i would need to submit right? Or can i for example auto submit after i pick an option? – user3564550 Jan 23 '19 at 09:29
  • its basically the same principle that some sites use in their city selection dropdowns, you select a country, lets say, USA, then the next dropdown shows all states, and so on, it depends on the inputs. i'd suggest you search first using "cascading dropdown php mysql" along those lines, you'll get the idea from that – Kevin Jan 23 '19 at 09:30
  • it depends on your requirements, if you wouldn't mind adding a submission loading of page you can use a form and a submit button, some choose to do an asynchronous call, it depends on what you require. – Kevin Jan 23 '19 at 09:31
  • Possible duplicate of [Jquery dependent drop down boxes populate- how](https://stackoverflow.com/questions/5910281/jquery-dependent-drop-down-boxes-populate-how) – dearsina Jan 23 '19 at 09:32