Field Types / Number (float) field
Note: You are currently reading the documentation for Bolt 4.0. Looking for the documentation for Bolt 5.2 instead?
Simple field for inputting numbers.
Basic Configuration:¶
number:
type: number
Example usage in templates:¶
{{ record.number }}
To use number values in Twig equations in {% for %} loops, the value must be extracted using the |trans
filter
{% for team in teams %}
{% set bonus = teams.score|trans + 2 %}
{% endfor %}
Options:¶
The field has a few options to change the functionality of the field.
min
The minimum accepted value.max
The maximum accepted value.step
How much to "step" the value up and down when using the browser controls.placeholder
Placeholder text inside the input control.mode
Number type. Can be eitherfloat
orinteger
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.