It's HTML. It's a number input.The quickest way to try it would be to select that code, and use Firebug or your browsers developer tools to drop in into the page you're viewing now.

With a little PHP assistance to limit the range to the last 120 years it'd look like this:

`php

$y = date('Y');$min = $y-120;

echo "";

`

(Also decided to change the placeholder attribute to value)

Is that HTML 4????

Step??

Max??

Min??

Placeholder??

Debbie

cranial_bore
—
2012-04-01T07:32:25Z —
#11

Just try it out. Unless you're using IE that will answer most of your questions.It's HTML5. In browsers that don't support this attribute it'll just act like a normal text box.

Max and min are surely obvious.

Placeholder I decided against, it wasn't a good use for that attribute, but in browsers that support it, it just gives a suggestion or hint that disappears when the user enters a value.

Step is the increment that the numbers 'step' by. Most modern browsers will give a spinner that the user can use as an alternative to typing.

DoubleDee
—
2012-04-01T07:43:34Z —
#12

cranial_bore said:

Just try it out. Unless you're using IE that will answer most of your questions.It's HTML5. In browsers that don't support this attribute it'll just act like a normal text box.

Max and min are surely obvious.

Placeholder I decided against, it wasn't a good use for that attribute, but in browsers that support it, it just gives a suggestion or hint that disappears when the user enters a value.

Step is the increment that the numbers 'step' by. Most modern browsers will give a spinner that the user can use as an alternative to typing.

Too much for my brain!!!

I'm sticking with HTML4 for now...

Thanks anyways,

Debbie

cranial_bore
—
2012-04-01T07:51:07Z —
#13

Think of it this way—it's a text box that users type a year into.If that user also happens to be using a browser with support (for example Firefox, Chrome, Safari, Opera) the browser will automatically limit them to entering numbers between this year, and 120 years ago.

You still validate server side, just as you have to with a select box.

DoubleDee
—
2012-04-01T07:57:08Z —
#14

cranial_bore said:

Think of it this way—it's a text box that users type a year into.If that user also happens to be using a browser with support (for example Firefox, Chrome, Safari, Opera) the browser will automatically limit them to entering numbers between this year, and 120 years ago.

You still validate server side, just as you have to with a select box.