Hello to all!

In django admin there is such a cool thing as automatic generation of forms. So, if the model has a link to another model, this field is represented in the form as a drop-down list with values ​​from the associated table.

How to do this in Yii forms? You can make a query to the database directly in the template, but this is not beautiful, and I think so is wrong

    1 answer 1

    Google + less than a minute of time = http://www.dbhelp.ru/by-example-chtml-dropdownlist/page/

    I will add that Yii itself is not yet able to select select, I hope this will be corrected in the next version.

    • Oh, this way I know. I thought there is a way to prettier. Thanks and on that) - nolka