I’ve just started to play with yii (I come from ZF). I’m trying to generate CRUD forms. Some of my tables have relations (1-N and N-N). When I try to generate CRUD forms with gii, all form fields are generated as text inputs.
Is there something I can change to automatically generate select boxes for foreign key fields?
If this is not possible, what’s the best practice to generate this select boxes? I don’t know if modify _form.php manually for each model is a good practice.
Thank you very much. I’ve read compliments about yii forums but this was really fast!
All these examples use queries at view level. Is this a good practice or is better to query model in controller (create action) and use a variable to communicate with view?
I’ve edited your quote because I’m not allowed to quote links >-<