in reply to CGI - input number fields

I think what you're seeing is that they have an empty value, instead of not being submitted at all. Which somewhat makes sense for (text) input fields, where the user might want to empty out a field.

Replies are listed 'Best First'.
Re^2: CGI - input number fields
by gsd4me (Beadle) on Sep 07, 2017 at 21:21 UTC
    I could understand *that* reasoning for a text field, but the number field? They have a specified range of 0 through 5 (and show "no selection" on the initial form display) so to my way of thinking, as the user hasn't even selected the field, no value has even been selected.
      What do you mean by a "number field"? I don't remember anything like that from HTML4.

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
        Input type of "number" - as per HTML5. see example below
        <INPUT MAX="5" MIN="0" NAME="K0030" TYPE="number">