HTML5 input types

Is there a way of setting a text field to e.g. input type=“number” if you want keypad-only soft keyboard on a mobile device?

Hi,

there’s an
Add-on in the directory
for just that.

-Olli

Thanks, I’ll give it a try. Hopefully it makes into core since one would assume this is a pretty standard request and the complexity is not exactly rocket-science-level.

Yeah, sounds like a good like a good feature for future releases. I can’t say for sure off the top of my head, but I think browser compatibility requirements might mean that it’s not possible for Vaadin 7 core.

-Olli

Turns out the add-on didn’t have exactly what I was lookin for (a PIN-type input based on password with type=number) so I’ll probably try extending the PasswordField and trying to find where to poke in a passthrough-attribute…

Hi,

looking at the above mentioned add-on’s source, looks like it should be fairly simple:

https://github.com/akquinet/vaadin-html5-widgets/blob/master/vaadin-html5-widgets-core/src/main/java/de/akquinet/engineering/vaadin/html5/widgetset/client/NumberFieldWidget.java#L26

Hope this helps,
-Olli

Unfortunately this add-on is for V7. Shouldn’t this be in Vaadin Core?
It is very hard using keyboard on numeric input fields on mobile…