Answer the question
In order to leave comments, you need to log in
How to replace field labels in YII?
Hello! Can you please tell me how to replace the usual labels with something similar to a placeholder from HTML?
<div class="row">
<?php echo $form->labelEx($model,'username',array("label"=>"Пароль")); ?>
<?php echo $form->textField($model,'username'); ?>
<?php echo $form->error($model,'username'); ?>
</div>
Answer the question
In order to leave comments, you need to log in
I solved the issue with the following array, because For some reason, the placeholder did not want to work separately.
<?php echo $form->textField($model,'username',array('size'=>60,'maxlength'=>255,'encode'=>false,'value'=>'','placeholder'=>'Placeholder content')); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question