-1

There are other questions such as this, which suggest that I can add a class as follows:

<?= $form->field($model, 'name_pu')->textInput(['maxlength' => true, 'class' => 'punjabi']) ?>

**THAT WORKS BUT **

but this replaces the form-control class given by bootstrap, which I don't want.

How can I ADD my own class, so as to get this result

<input type="text" id="regs-name_pu" class="form-control punjabi" name="Regs[name_pu]" maxlength="100">
Community
  • 1
  • 1
Ramesh Pareek
  • 1,601
  • 3
  • 30
  • 55

2 Answers2

1

You should simply add the needed class :

<?= $form->field($model, 'name_pu')->textInput(['maxlength' => true, 'class' => 'form-control punjabi']) ?>
soju
  • 25,111
  • 3
  • 68
  • 70
1

Try

<?= $form->field($model, 'name_pu')->textInput(['maxlength' => true, 'class' => 'form-control punjabi']) ?>
AuZu
  • 90
  • 12