io.input.number
A number, within the limits you set.
io.input.number asks a person for a number and hands it to your code. Set the smallest and largest value it accepts. Whole numbers only unless you allow decimal places. The server checks every answer again.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Refund order
What you can set
The settings you will reach for most, each with the line of code that turns it on.
Limits. The smallest and largest number accepted. Anything outside gets a message under the field.
Decimal places. Whole numbers by default. Allow as many decimal places as you need; typing 49.90 gives 49.9.
Help text. A line under the field says what the number means, such as the currency.
Optional. The field is required by default. With .optional() it can stay empty and the handler gets undefined.
Your own check. .validate() runs on the server and can ask your database. It returns a message to show, or nothing when the number is fine.
Next to other fields. Inside io.group the number shares one form with other fields. The handler gets all the values together.
More in the docs
This page shows the idea. The docs have every prop, the checks on the server and more examples.
Next components
Three more calls on io. Each one shows a control and hands your code a typed value.
Write your first tool today.
An async function, a few await calls, and the form is in the browser.