use yii\helpers\Html; echo Html::activeHiddenInput($model, 'attribute');
echo Html::activeHiddenInput($model, 'attribute', [ 'id' => 'my-input', 'value' => '12345' ]);
echo Html::activeHiddenInput($model, 'attribute', [ 'attribute' => 'other_attribute' ]);This will generate a hidden input tag that is bound to the "other_attribute" attribute of the $model object. Package library: Yii Framework.