Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

Place Holder Text Does Not Show in Text Area

This is bizaar. I use placeholder text in forms to helpthe user how & what to input. Placeholders work fine one simple input fields, however, on a textarea the placeholder text just does not want to show up. Well, not at least untill you have entered something. Then and only then, f you delete the text you have entered does the placehold text show up.

I have tried with Collective as well as with raw HTML. Both gives the same result.

Any ideas?

<div class="form-row form-group">
                    <div class="col-sm-12 col-md-12"><textarea class="form-control" id="quote_comment" placeholder="free format comment" rows="3" name="comment" cols="50"> </textarea></div>
                     </div>
0 likes
3 replies
guybrush_threepwood's avatar
Level 33

Try removing the space between the textarea open and close tags.

Now:

<textarea class="form-control" id="quote_comment" placeholder="free format comment" rows="3" name="comment" cols="50"> </textarea>

Change to:

<textarea class="form-control" id="quote_comment" placeholder="free format comment" rows="3" name="comment" cols="50"></textarea>
2 likes
vincej's avatar
Level 15

Unbelievable! Thank you very much !!

1 like

Please or to participate in this conversation.