Could someone give me an example how to create a Dropdownlist please?
I do not understand the help files as there are no examples.
If I have 2 tables, categories and Posts.
I have set categories @has many@ Posts in mysql benchmark.
I would like to output my dropdownlist on the categories_id field
<?= $form->field($model, ‘categories_id’)->textInput() ?>
I tried this:
<?= $form->field($model, ‘categories_id’)->dropDownList() ?> but it did not work.