I’m using Wix Forms, and I have a few input fields set to the number type. They are not required fields, so users are able to leave them blank.
The problem is that when I open the dataset, the number fields that were left blank are underlined in red, and a little tooltip-style message says “Cell value type is Text. Change to Number.” When I click on “Change to Number,” the field stays blank and the error message goes away. I suppose I can leave them all as errors, but it distracts me from any fields that could be genuine errors. (Plus it’s just irritating to see all that red in my otherwise pretty dataset!)
Using the console log, I’ve determined that when the form is submitted, the blank number fields are being interpreted as empty strings (as opposed to null values). But I don’t seem to be able to convert them to null values before they get saved to the dataset. At one point I was able to convert them to zeros by adding a regex pattern validation to one of the fields, which forced the user to enter only numbers. But I would prefer not to convert the values to zeros, because those are obviously different from blank values.
Any ideas what’s going on? How can I get my number fields to behave like number fields even when they’re empty? Thanks in advance!