I created ActiveForm using yii2 as follows:
<?=$form->field($item, 'finalPrice', [
'options' => [
'tag' => 'div',
'class' => '',
],
'template' => '<span class="col-md-2 col-lg-2"><label class="control-label">Final item price</label>{input}{error}</span>'
])->textInput([
])->label(false)?>
and he gave the result:
<span class="col-md-2 col-lg-2"><label class="control-label">Final item price</label><input type="text" id="item-finalprice" class="form-control" name="Item[finalPrice]"><p class="help-block help-block-error"></p></span>
Now I want to do this & lt; input type = "number" .., not text .. (so that the user can change the value using the browser buttons up / down). is there any way to do this?
source
share