Numeric field formatting?

Hi. Can I control the decimal formatting on a Numeric field? When you select it displays 0 decimals, when you unselect it shows 2 decimals. I’d like to have it always show 0. I was trying things like this (step/increment would be cool too):

fd.control(‘SP_Interval’).numericOptions = { min: 0, max: 100, decimals: 0};

But that seems to only work on the Likert scale. Is this possible on numeric?

Thanks!

Dear Bjorn,

Please check this code:

fd.field("NumericInternalName").widget.setOptions({format: "n0", step: 10});

1 Like

Good news, everyone!
With the recent update to v1.6.1, we've added customization options for both Number and Currency field and now their format can be set in the editor - https://plumsail.com/docs/forms-sp/designer/fields-sp.html#designer-currency

The value retrieved with JS will stay the same number type, only presentation changes:
image