Skip to content

Deprecated since 7.2

This page documents the classic module layer (CBController and cbInit()). It still works in every 7.x release, but new code should use resources and pages.

Use instead: TextInput::make('stock')->numeric().

Number Form Type ​

Showing input number

Code Sample ​

php
$this->form[] = ['label'=>'Amount','name'=>'amount','type'=>'number','min'=>0,'max'=>100];

By putting min attribute, it will make a minimal amount of the number and also by putting max attribute, it will make a maximal amount of the number

What's Next ​

Table Of Contents ​

Released under the MIT License.