form2js icon indicating copy to clipboard operation
form2js copied to clipboard

feature: emptyToNull

Open lookfirst opened this issue 14 years ago • 0 comments

I added this for form2js just above the skipEmpty line... basically, I want any empty value to be treated as null instead of empty string. This also works great with skipEmpty because then I don't have to send back empty values if I don't want to.

            if (emptyToNull && (value === '')) { value = null; }

lookfirst avatar Nov 15 '11 18:11 lookfirst