I'm creating a web application for iPhone that has several text
entry fields for numeric data. I've been looking for how to 1)
restrict character entry to numbers, or numbers and decimal points,
and 2) have the iPhone default to the numeric keyboard when one of
these fields is selected. Any clues?
Your best bet for (1) is to use JavaScript and key events to restrict
character entry (or validate via JavaScript using onchange events)
like you would for any modern web browser.
Per (2), iPhone OS 1.x would bring up a numeric keyboard for some text
fields based on the name of the field, but we found this caused too
many compatibility issues (sometimes the user needed to enter non-
numeric characters, but couldn't since they couldn't switch
keyboards). This feature was removed in iPhone OS 2.0.