Tia Dame
Tia Dame

Reputation: 31

Placeholder text not appearing in textarea

I know someone here can help me out. I've looked at all the forums here on the same topic, but maybe someone can help my specific case. The placeholder isn't showing up for my textarea. Here is the code:

<fieldset class="contactFormDetails">
    <input type="text" name="input-name" placeholder="Name" />
    <input type="text" name="input-mail" placeholder="Subject" />
</fieldset>
<fieldset class="contactFormMessage">
    <textarea name="input-message" placeholder="Type your message here"></textarea>
</fieldset>
<fieldset class="contactFormButtons">
    <input type="submit" value="Send" />
</fieldset>

Upvotes: 3

Views: 6084

Answers (2)

Matt Lambert
Matt Lambert

Reputation: 3665

You realize you can do this right?

<textarea name="input-message" placeholder="Type your message here"></textarea>

Upvotes: 1

Mathijs Flietstra
Mathijs Flietstra

Reputation: 12974

What browser are you using? The placeholder attribute isn't supported in older versions of IE.

Have a look here to see if it is supported in your browser version: http://caniuse.com/input-placeholder

Have a look here: https://stackoverflow.com/a/13281620/1846192 for a jQuery plugin which adds support for the placeholder text in older IE versions, and which doesn't submit the placeholder text as a value when you submit your form.

Upvotes: 2

Related Questions