splitforms.com

HTML · ATTRIBUTE

HTML step attribute: decimals, time slots and stepMismatch

Last reviewed

step sets the gap between allowed values on number, range, date, time, datetime-local, month and week inputs. The default is 1 for number and range, 60 seconds for time, 1 day for date and 1 month for month. A value that doesn't fit the step sets validity.stepMismatch and blocks the submit; step="any" turns the check off.

  • Live, editable example
  • Copy-paste snippet
  • Attributes & common mistakes
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Edit the HTML and re-run it
Runs in a sandbox. Nothing is sent.

Minimal snippet

step-example.html
<input type="number" name="price" min="0" step="0.01" required>

Copy-paste code

HTML step attribute code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
step.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <!-- Prices: allow cents (or use step="any" to allow any decimal) -->
  <label for="price">Price</label>
  <input type="number" id="price" name="price" min="0" step="0.01" required>

  <!-- Odd numbers only: steps count from min, so 1, 3, 5... -->
  <label for="seats">Seats (odd numbers)</label>
  <input type="number" id="seats" name="seats" min="1" step="2">

  <!-- Time step is in seconds: 900 = 15-minute slots -->
  <label for="time">Time</label>
  <input type="time" id="time" name="time" min="09:00" max="17:00" step="900" required>

  <!-- Honeypot: hidden from people, bots fill it in -->
  <input type="checkbox" name="botcheck" style="display:none">

  <button type="submit">Send</button>
</form>

Attributes · <input step>

Which attributes work with step?

min (or value) sets where the steps start; max sets where they stop.

HTML step attribute attributes and what each one does
AttributeWhat it doesDocs
stepThe gap between allowed values, counted from min. step="0.01" allows cents; step="any" turns the check off. For time inputs it is in seconds.MDN
minThe lowest allowed value and the step base: with min="1" step="2", only 1, 3, 5… pass. Without min, the base is the value attribute.MDN
maxThe highest allowed value. The arrow keys and spinner stop at the last valid step below it.MDN
valueThe starting value, and the step base when there is no min.MDN

Common mistakes

step mistakes to avoid

Most problems come from the default step of 1, an unexpected step base, or trusting the browser alone.

  1. type=number with no step rejects 9.99

    The default step is 1, so a number input without step only accepts whole numbers and flags 9.99 as stepMismatch. Add step="0.01" for prices, or step="any" to allow any decimal.

  2. The step base is min, not 0

    Allowed values are min plus whole steps. With min="1" step="2", 2 and 4 fail and the browser says something like "Please enter a valid value. The two nearest valid values are 1 and 3." Without min, the base is the value attribute.

  3. Time step is in seconds

    On type="time", step="15" means 15 seconds, not 15 minutes; use step="900" for 15-minute slots. A step below 60, like step="1", also makes the field show seconds.

  4. The picker may ignore step, so check on the server

    Some browsers' time and date pickers still let people choose any value and only block it on submit. Anyone can also remove the attribute or send the form without the browser, so check the value against your step on the server too.

Sources: WHATWG HTML Standard: the step attribute · MDN: step

Copy-paste ready

The HTML step attribute example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html step attribute form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <input step> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML step attribute to any page.

Copy the html step attribute example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML step attribute example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See payment forms →Need time slots? Online booking →

Setup guides for the stacks you use

Questions

HTML step attribute questions, answered.

View all FAQs
How do I allow decimals in a number input?

Add step="0.01" to allow two decimal places, like prices, or step="any" to allow any decimal. Without step, the default is 1 and a value like 9.99 is flagged as stepMismatch, so the form won't submit.

What does step="any" do?

It turns off step checking, so any value inside min and max is valid. The arrow keys and spinner then move by the type's default step, like 1 for a number input.

What is stepMismatch?

validity.stepMismatch is true when the value doesn't land on min (or value) plus a whole number of steps. The browser blocks the submit with a message like "Please enter a valid value. The two nearest valid values are 1 and 3."

How do I make a time input use 15-minute slots?

Use step="900", because the time step is in seconds (15 × 60). The arrow keys then move 15 minutes at a time, and a typed time like 09:10 is flagged as stepMismatch. Set min, like min="09:00", so the slots start on the hour.

Does step stop bad values reaching my backend?

No. step is only a client-side check: it can be removed in dev tools, skipped with novalidate, or bypassed by a script or bot. Always check the value again on the server.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08 per month, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions per month
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ