NumberBox
Numeric input with integer/decimal presets, min/max range, and step control.
Examples
With Step
Enter numbers to see output...
PHP PHP Methods (Fluent)
| Method / Property | Parameters | Description |
|---|---|---|
$m->numberbox($id) | string | Create a number input component. |
->value($value) | ?string | Set the initial value. |
->placeholder($text) | string | Set placeholder text. |
->name($name) | string | Form field name. |
->required($req) | bool | Mark as required. |
->min($min) | float | Minimum allowed value. |
->max($max) | float | Maximum allowed value. |
->step($step) | float | Step increment. |
->disabled($dis) | bool | Disable the input. |
->integer() | | Preset for integers: step=1. |
->decimal($precision) | int | Preset for decimals with given decimal places (default: 2). |
->range($min, $max) | float, float | Set both min and max in one call. |
->allowDecimals($allow) | bool | Allow decimal input (auto-sets step=0.01). |