I'd like to pass two values from one list (from two different database tables), and use them in cascading databasejoin dropdowns on another form (a third database table):
I have a list called 'Schedules', the list shows data from two tables : 'COURSE_DETAILS' (PK=course_id) and 'COURSE_SCHEDULE' (PK = course_schedule_id, contains the field 'course_id'). A course can have many schedules. The primary key/main table on the list is the course_schedule_id.
When I click on a field 'book now' on that schedule list I open up a form in a different page called 'Book a Course'. The user will enter in their details into this form and save it to another table 'COURSE_BOOKINGS' (PK=booking_id, a schedule can have many bookings, the course_id and course_schedule_id are both saved to this table also)
What I want to do, and can't figure out how, is to pass both the 'course_id' and the 'course_schedule_id' from the row selected on the schedules list to the booking form. And use it in the booking form to select a specific row in the databasjoin dropdown field for 'courses' which uses a cascading dropdown to filter the course schedules for that course. The rows defaulted in the dropdowns should be based on the course_id and course_schedule_id passed to this form.
i.e. I don't want to open up the booking form for the course_schedule_id value (which would happen if I passed the rowid in the URL), but I want a new booking row to be displayed, and have the COURSES.course_id and COURSE_SCHEDULE.course_schedule_id dropdowns in the booking page defaulted to the course_id and course_schedule_id of the row selected in the original list on the previous page.
I have a list called 'Schedules', the list shows data from two tables : 'COURSE_DETAILS' (PK=course_id) and 'COURSE_SCHEDULE' (PK = course_schedule_id, contains the field 'course_id'). A course can have many schedules. The primary key/main table on the list is the course_schedule_id.
When I click on a field 'book now' on that schedule list I open up a form in a different page called 'Book a Course'. The user will enter in their details into this form and save it to another table 'COURSE_BOOKINGS' (PK=booking_id, a schedule can have many bookings, the course_id and course_schedule_id are both saved to this table also)
What I want to do, and can't figure out how, is to pass both the 'course_id' and the 'course_schedule_id' from the row selected on the schedules list to the booking form. And use it in the booking form to select a specific row in the databasjoin dropdown field for 'courses' which uses a cascading dropdown to filter the course schedules for that course. The rows defaulted in the dropdowns should be based on the course_id and course_schedule_id passed to this form.
i.e. I don't want to open up the booking form for the course_schedule_id value (which would happen if I passed the rowid in the URL), but I want a new booking row to be displayed, and have the COURSES.course_id and COURSE_SCHEDULE.course_schedule_id dropdowns in the booking page defaulted to the course_id and course_schedule_id of the row selected in the original list on the previous page.