Matt
Matt

Reputation: 1

Pre populated form field not working in internet explorer

I have a PHP form on a website I have been working on..I used the following to ensure the form was pre-populated with a description:-

id="contactName" input name="name" class="input" type="text" placeholder="Enter your name here"

I used the Placeholder="Pre-populated" this works fine in Chrome, Firefox and Safari, but doesn't show up in Internet Explorer any ideas of a work around to make the text show up in IE?

cheers

Matt

Upvotes: 0

Views: 994

Answers (1)

Jason M. Batchelor
Jason M. Batchelor

Reputation: 2951

placeholder is not supported in IE9 or less. Theoretically will be supported in IE10. See: http://caniuse.com/#search=placeholder

You might do some Google searching for a few other solutions. I found one that purported to work on CSSNewbie.com but I didn't see it when I ran its test script in my IE... maybe I was missing something. http://www.cssnewbie.com/cross-browser-support-for-html5-placeholder-text-in-forms/

I also found a gist that has some Javascript to shim the support: https://gist.github.com/1105055

Upvotes: 1

Related Questions