cancel
Showing results for 
Search instead for 
Did you mean: 

nuxeo-input widget float instead of int

ElmarKnipp_
Confirmed Champ
Confirmed Champ

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?

1 REPLY 1

Gregory_Carlin
Elite Collaborator
Elite Collaborator

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

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.