Hi all,
I am working on a calendar scheduling function for a school that I'm having a hard time wrapping my brain around. My DB table has 3 columns - ApptDate, ApptTime, ApptSlots. Most ApptDates are listed more than once because there is more than one time available for a date. See below for example:
ApptDate | ApptTime | ApptSlots |
---|---|---|
9/9/2014 | 3:00 PM | 2 |
9/9/2014 | 3:30 PM | 2 |
9/9/2014 | 4:00 PM | 2 |
The page queries this table for all data. Then, there is a query of that query that selects distinct dates and outputs them in a drop down--the first step in a user choosing their appointment. The next form field I'll have is a drop down for times. What I'd like to happen is based on the user's date selection, the corresponding times will appear in the time drop down, as long as ApptSlots gt 0. Before the user selects a date, I'd like the time drop down to be hidden or disabled.
Is this a possibility or am I dreaming?
Thanks for the help!