I’m losing hope… I can’t catch a few points… I searched through topics but none was enough complete or clear (to me) to understand how to accomplish my goal.
I have a create form for AR class ‘Activity’… inside this very form I have to “link” another AR class (‘Teacher’) by making the user choice from a CGridView list. So far no problem…
What I can’t figure out is how to filter this CGridView, in realtime, using some of the field of the same form…
Form 'create' for 'Activity' field 'code' field 'description' [...] field 'service_type' (<-- necessary field to narrow down list of teachers) field 'date_from' (<-- optional field to narrow down list of teachers) field 'date_to' (<-- optional field to narrow down list of teachers) listbox of choosen teachers (<-- where id of choosen teacher go) cgridview (with checkboxes) (<-- to update using prev filters) [...]
‘service_type’ it’s an external id
‘date_from’ and ‘date_to’ should be used to search through teachers’ calendar for free time
I can’t understand where I should put the code that make the query with parameters (filters) and how to bring back result into CGridView.
Thanks in advance