I want to create a form with two dropdown boxes so that the options in the second dropdown depend on the choices in the first dropdown. So Dropdown1 might ask the user to opt for CourseA or CourseB and Dropdown2 might present sets of dates - but the dates would differ depending on what the choice in Dropdown1 had been.
I have tried using the post array to set the Dropdown2 choices but then realized that it is not set until the form is submitted. My problem happens before the form is submitted.
Can anyone suggest a way of doing this? I'm using codeigniter but think that this is a php rather than a codeigniter issue.
You need to make an asynchronous call to the server once the first drop down is selected. Javascript is going to be your answer. I am not sure if CodeIgnitor will do it natively, but a framework like J-query will probably get you there the quickest.