Answer the question
In order to leave comments, you need to log in
How to set hidden input value in yii2 using ActiveForm?
In general, I need to set different hiddenInput values for different operations.
How to do it?
The code is something like this:
<? echo $form->field($model1, 'operation')->hiddenInput(); ?>
Answer the question
In order to leave comments, you need to log in
<? echo $form->field($model1, 'operation')->hiddenInput(['value' => 'hidden value']); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question