Yii v2 snippet guide

Comparing #229 with #230

Revision #230 was created by rackycz rackycz on Aug 21, 2020, 9:35:05 PM.

typo

Content

[...]
<?= $form->field($model, 'id_currency')->dropDownList($currencies) ?>
```

Note: In other views you will need models with predefined relations to reach the correct value. Relations can be created using GII (when they are defined in DB) or [manually](https://www.yiiframework.com/doc/guide/2.0/en/db-active-record#relational-data).

**GridVie
vw - Variable page size**
---
GridView cannot display DropDownList which could be used by the user to change the number of rows per page. You have to add it manually like this:

When you are creating a new model using Gii, you can select if you want to create the SearchModel as well. Do it, it is usefull for example in this situation. Then add following rows to the model:
[...]