summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/javascript_reference.rst')
-rw-r--r--doc/reference/javascript_reference.rst35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst
index 14647955afa..c1f2ae9cb0d 100644
--- a/doc/reference/javascript_reference.rst
+++ b/doc/reference/javascript_reference.rst
@@ -1397,6 +1397,23 @@ order.
- Supported field types: *integer*
+ Options:
+
+ - type: setting the input type (*text* by default, can be set on *number*)
+ On edit mode, the field is rendered as an input with the HTML attribute type
+ setted on *number* (so user can benefit the native support, especially on
+ mobile). In this case, the default formatting is disabled to avoid incompability.
+
+ .. code-block:: xml
+
+ <field name="int_value" options='{"type": "number"}'/>
+
+ - step: set the step to the value up and down when the user click on buttons
+ (only for input of type number, 1 by default)
+
+ .. code-block:: xml
+
+ <field name="int_value" options='{"type": "number", "step": 100}'/>
- float (FieldFloat)
This is the default field type for fields of type *float*.
@@ -1411,6 +1428,24 @@ order.
<field name="factor" digits="[42,5]"/>
+ Options:
+
+ - type: setting the input type (*text* by default, can be set on *number*)
+ On edit mode, the field is rendered as an input with the HTML attribute type
+ setted on *number* (so user can benefit the native support, especially on
+ mobile). In this case, the default formatting is disabled to avoid incompability.
+
+ .. code-block:: xml
+
+ <field name="int_value" options='{"type": "number"}'/>
+
+ - step: set the step to the value up and down when the user click on buttons
+ (only for input of type number, 1 by default)
+
+ .. code-block:: xml
+
+ <field name="int_value" options='{"type": "number", "step": 0.1}'/>
+
- float_time (FieldFloatTime)
The goal of this widget is to display properly a float value that represents
a time interval (in hours). So, for example, 0.5 should be formatted as 0:30,