Form Number Field Does Not Allow Decimal Numbers

When placing a number field on the form, decimal numbers are not allowed. Is there a way around this beside using a text field? Thanks.

Hi,

No, currently the number field is meant for numbers without decimals.
So another decimal field type could be added to the form modeler pallette.

Best regards,

Tijs

I can work this weekend on adding the additional field. Can you please provide me some info to get started?

Ok great. The form-builder.js script file is a good place to get started. On line 203 you’ll see the palette definition. You’ll also need to change the flowable-form-model project and include the new FormFieldType. To render the new form field you can have a look at the form-element-template.html file and the render-form.js script file. Hope this helps to get started, let me know if you need more info.

Best regards,

Tijs

I have this working in the modeler and task. However, when I view the variables in the admin app, the value still shows as a string. I am assuming I am missing a mapping somewhere so the db execution saves to the double column. Where can I locate this?

Also, in the UI, would you like the field named “Double Number” or “Decimal Number” or something else?

I found the missing mapping. Just want to check with the preferred name and will be ready to create the pull request.

Hi,

Ok great, I would vote for Decimal number.

Best regards,

Tijs

I have submitted the pull request. Let me know if you see any issues.

Thanks, merged the PR.

I just submitted an PR which corrects the missing placeholder property for the decimal field.

Also, I made the expression field to have a selectable size setting. Finally, on the process initialization the expression is displayed instead of the empty message which allows the expression field to be used as a label on the process start form.