Unexpected behavior with null values in Form


It took me a while to find how to reproduce an issue I’m having, but I finally found the simplest way to demonstrate it in this snippet.

When an input field on a Form is set to a null value, using form.getValue() to get the data from the form and then reapply it with form.setValue(), the input field then displays the string"null". It should be set back to a null value, or at the least an empty string.

With a little more testing, I’ve figured out that it’s in the getValue() function; it’s returning the field value as “null” instead of null.


Please, note, that according to the documentation:

the value of an input form control should be of string or number type.