Good afternoon. I have a form that is used on the page several times. In this form, for field use MaskedInput widget. The problem is that the widget prescribes more of the same id for the field. How to make a widget generatorul id or how to use a widget by id and field name. Thank you!
Here is the code:
<?= $form--->field($model, 'phone')->widget(MaskedInput::className(), [
'mask' => '+9 (999) 999 99 99',
])->textInput()
?>
<input type="text" id="form-phone" class="form-control" name="Form[phone]">