How to set the value attribute of the model is variable, in controller without form in the view?

There are several forms on the view, the values of which are given to the attributes of the model (scenario[add]).
Must be set to one of the attributes (country_id) is equal to a variable, do not create form, but simply tied to the same value for all additions of records in the database.

In Yii2 a beginner, please detail... Thank you.
June 14th 19 at 18:30
2 answers
June 14th 19 at 18:32
The attribute value is not in the form you can set, for example, using the DefaultValidator
June 14th 19 at 18:34
$model->someProperty = 'myValue';

Find more questions by tags PHPYii