Wow look at this number input

Do you know HTML?

So you know about the latest server-side hook context API for suspensfully rendering state machines in that JavaScript framework...

But can you successfully submit this form?

Here's all the fancy code you need to do this on your own website on-the-line:

<input type="number" name="amount" required min="1" max="5" step="0.01">

Hi, I'm Sia.

I'm a freelance performance engineer and web developer, and I'm available for your projects.

Hire me

You might also like



Ru Singh Taty Grassini Doug R Thomas, Esq. Robin Osborne πŸ‡ͺπŸ‡Ί (remaining indoors) Sergey Chernyshev Swamp King Falconi Sigismund Freudenthal

12 Replies

π••π•˜π•£π•’π•žπ•žπ•’π•₯π•šπ•œπ•  π••π•˜π•£π•’π•žπ•žπ•’π•₯π•šπ•œπ• 

Well played πŸ‘πŸ‘ source

Sia Karamalegos Sia Karamalegos

Lol thanks. Pandemic boredom had me thinking about this at 5am this morning πŸ˜† source

Katie Sylor-Miller Katie Sylor-Miller

<Kermit drinking tea dot gif /> source

Jhey πŸ»πŸ›  Jhey πŸ»πŸ› 

This! πŸ’― "DOM manipulation?", "Semantic Markup?", "Keyboard Accessible?!" πŸ˜… source

Simone Bussoni Simone Bussoni

"Too young JS Front-end devs" is more precise πŸ˜‚ source

Barry Pollard Barry Pollard

Have you read this? Fascinating post on why it’s often not the best option:… source

rvk rvk

My two main gripes with the number input type are: 1. It would be really nice if it had a mode where I could use it to input hexadecimal insteal of having to use a kludgy text type input with a constraint to only allow hex chars. 2. People don't use it damn-near often enough. source

Christoph Werner Christoph Werner

Number input doesn't cut it. Too hard to give the up and down buttons a cross-browser styling that is consistent with the rest of the UI. Unable to provide a step size for the buttons that is not used in validation so you can type in something with more digits. source

Sia Karamalegos Sia Karamalegos

Hi there, let me clarify that my post was a joke about how tech twitterati get excited and flood the airwaves about fancy framework features when a lot of devs don't know basic HTML and CSS. I'm actually a front-end dev who likes JS too... source

Sia Karamalegos Sia Karamalegos

I just want more devs to learn core web fundamentals before jumping on the bandwagon. My thoughts on validation - if I were to use a JS validation library, I would not also apply validation attributes. With all of this you still need server-side validation anyway. source

Christoph Werner Christoph Werner

I know - while the pain points with input type=number were from real projects, I fully agree! πŸ˜… source

Sia Karamalegos Sia Karamalegos

This is really interesting. I didn't know about `inputmode="numeric"`. I've been trying to research more about this, and I can't find much about Dragon Naturally Speaking support for web - it seems they don't officially support web dictation and you need a separate extension? source

These are webmentions via the IndieWeb and Mention this post from your site:

← Home