Number fields issue with default value; stores leading zeroes

Created on 26 August 2024, 4 months ago

Problem/Motivation

Saving a number field value with a leading zero does results in the value being stored with a leading zero.

Steps to reproduce

Add a number field to a webform.
Set the field's default value to zero.
Load the webform.
Confirm that the number field has a zero filled in as a default.
Select the number field to activate it.
Without selecting the default value, type a new number, e.g. "5".
Note that the field now says "05".
Submit the form.
Confirm that the value of the number field is "05" rather than the expected "5".

Proposed resolution

Number fields hare tidied up prior to saving the submission so that the stored value is

Remaining tasks

Work out the best approach to do this.

User interface changes

Number fields do not store unnecessary characters, e.g. leading zeroes.

API changes

TBD

Data model changes

TBD

πŸ› Bug report
Status

Active

Version

6.3

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024