I've got a Profile model and a form in which i want to place a (hidden) textinput-field with a representing value from the user.
I managed to get the right (single) value in following dropdown:
$form->field($profesta, 'current_establishment')->dropDownList(ArrayHelper::map(Profile::find()->where(['id_user' => Yii::$app->user->identity->id])->all(),'current_establishment','id_user'));
But i want to change it to a textinput-field and i think it must be something like:
$form->field($model, 'id_user')->hiddenInput(['value' => ???])->label(false);
Thanks in advance.