Documentation for input type="number"

I have been trying to improve (i.e., "idiot-proof") the edit dialogs of some contributed nodes, and it would help to have more information about the input type="number" tag. As far as I have found, the official documentation refers only to the text, checkbox, and select types. A number of core and contributed nodes (including my own) use the number type more or less successfully, but the documentation refers to using text for "string/number properties". Does that mean that the use of number is discouraged?

It isn't discouraged... Just wasn't really on my radar when I wrote those docs.

Thanks, Nick. I really don't expect you to write documentation just now. I'm mainly interested in writing a few validation functions for this widget, but its behavior seems a bit odd at times. If it's not too much trouble, can you point me to the source for it?

<input type="number"> is an HTML5 standard element - <input type="number"> - HTML: HyperText Markup Language | MDN

Well, that shows how long I've been at this. Does that mean it can be used with the other attributes (like max and min) in the edit dialog?

Yes, you can.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.