nuxeo-input widget float instead of int

I want to give the user a numeric input field with 2 decimal fractions. I use the following code:

<nuxeo-input role="widget" label="[[i18n('com.mycompany.nuxeo.richfile.value')]]" name="value" value="{{document.properties.rfs:value}}" type="number" >

Unformtunately this gives me only the possibility to enter an integer value, no decimal fraction.

Is there the possibility to achive this? And 2nd questions: Is it possible to format the number with a 1000th decimal points?

0 votes

1 answers

751 views

ANSWER



Hello,

You may use the pattern attribute, with an expression rule, to make sure it has a decimal format. By default, Nuxeo Studio adds step="0.01" when generating a layout from a float property.

Hope it helps

0 votes