次のように yii2 を使用して ActiveForm を作成しました。
<?=$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([
// ** i want numeric value **
])->label(false)?>
そして、それは次の結果をレンダリングしました:
<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>
今、私はそれを < input type="number" .. ではなく text .. にしたいです(ユーザーはブラウザの上下ボタンを使用して値を変更できます)。それを行う方法はありますか?