Hello,
how can i render a dropdown from database.
For example from table Users
Form.php
$users = Users::find();
$usersSelect = new Select("users",array(
$users, array(
"using" =>
"id",
"name",
),
"useEmpty" => true,
"emptyText" => "Please, choose one...",
"emptyValue" => "@"
)
);
$this->add($users);
Volt
{{ form.render('users') }}
Thx