formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

[BUG] Number Input Value can't be erased

Open zzdjk6 opened this issue 4 years ago • 7 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [x] Form.io
    • [ ] Local deployment
      • Version:
  • Formio.js version: 4.13.0
  • Frontend framework: React
  • Browser: Chrome
  • Browser version:

Steps to Reproduce

  1. Add a Number Input in form (e.g., "numberField1")
  2. Submit the form with nothing entered, or remove all content of the Number Input

Expected behavior

The data in request payload should include numberField1: null

Observed behavior

The data in request payload does not include numberField1

zzdjk6 avatar Apr 28 '21 03:04 zzdjk6

@zzdjk6 this PR should fix it.

mikekotikov avatar Apr 30 '21 16:04 mikekotikov

It looks like https://github.com/formio/formio.js/pull/4049 is making empty number fields an empty string rather than null. In 4.14.0-rc.2 I've run into an issue where empty, optional number fields are returning a validation error from the portal because an empty string isn't a number.

DaveBagler avatar May 17 '21 14:05 DaveBagler

FYI PR #4049 is being reverted. Empty number fields should be null, not an empty string.

heather-formio avatar May 23 '22 21:05 heather-formio

Is that issue fixed? In which version I will get this fix?

vaibhav1038 avatar Oct 07 '22 04:10 vaibhav1038

This issue is still persist :(

ptugger avatar Aug 14 '23 18:08 ptugger

Any news in this? Using version 4.17.1 and the issue still persists, any workarround?

molequetu avatar Apr 01 '24 09:04 molequetu

Thank you for reporting this issue. I am able to reproduce it and have logged a ticket for the backlog. We are always willing to review any contributions to resolve this issue from the open-source community.

For internal reference: FIO-8148

olgabann avatar Apr 02 '24 12:04 olgabann