I have a Course Offerings vocabulary where each taxonomy term is an educational course.
Users have a multivalued My Courses Entity Reference field referring to the terms of the courses they're enrolled in.
I have a custom content type (Entityform) with two more Entity Reference fields: a Course field and a Student field. The user must first select a course (a Course Offerings taxonomy term), and then select a student (a user).
Here's the kicker: I need to filter the Student select list options based on what the user selected in the Course field.
The Course field select options are generated by a view that returns the current user's My Courses field courses. After the user selects one of their courses, the Student field select options should be generated by a view that uses the course they chose as a contextual filter to return a list of only the users enrolled in that course.
I know how to build the view once I have the contextual filters, but I'm stumped as to how to pass the Course term to the view as a contextual filter. Is this possible?
EDIT FOR CLARIFICATION:
Both the Course and Student fields are Entity Reference fields.
Both use select-list widgets whose options are populated with views Entity Reference displays.
The Course field comes before the Student field on the eform. The intention is that the person filling out the form will first choose the course. Then they'll choose the student from a list of students enrolled in the course they just selected.