Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set a textInput to readOnly in Yii2?

How do you set a textInput to readOnly? I have the sample code below:

<?= $form->field($model, 'GrossPay')->textInput(['id'=>'GrossPay','readonly'=> true])?>
like image 594
Ermene Avatar asked Sep 19 '25 16:09

Ermene


1 Answers

It's readOnly not readonly but it does not make a difference here.

<?= $form->field($model, 'GrossPay')->textInput(['id'=>'GrossPay','readonly'=> true])?> 
like image 83
Insane Skull Avatar answered Sep 21 '25 06:09

Insane Skull