I am building a web application using Symfony 1.4 and Doctrine for school and I want to make a very simple form to add a course to the student.
The main problem I am facing is that in the drop-down list I want to show only those courses in which the student is not currently registered.
I already have a function in the model (in Student.class.php) that returns all courses in which the student is not registered, but the problem is that I donβt know how to pass the student to configure () forms. I tried several options, for example, passing it with the form constructor to a global variable or a special sets method, but none of them worked.
Is there any form for passing the configure () method to the student?
Thanks!
source share