HOW TO ADD PLACEHOLDER TO CAPTCHA INPUT FIELD

To add placeholder to captcha input field you need to declare it in options in form field declarations.You can also provide the class name along with the placeholder.

<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' =>
'<div class="row">
<div class="col-lg-4">{image}</div>
<div class="col-lg-6">{input}</div>
</div>',
'options' => [
'placeholder' => 'Enter verification code',
'class' => 'form-control',
],
])
?>

About Eshwar Dubey

Leave a Reply

Your email address will not be published. Required fields are marked *