How to use HTML5 placeholder with RoR

Marc-Antoine Ross October 5th, 2010

I recently started a web app project with a great team. It’s built on the excellent rails framework. I say excellent because I’m discovering it and really enjoying it. You will see a few posts about my discovery.

To add a placeholder value on an input in an HTML5 form, simply use this sample code:

<%= form.text_field :emailaddress, :placeholder=>’email address’ %>

If you don’t know what a placeholder is, you should have a look at this article.

Entry Filed under: General

Leave a Comment

Required

Required, hidden

Some HTML allowed

Trackback this post  |  Subscribe to the comments via RSS Feed

Schedule

October 2010
M T W T F S S
« Sep   May »
 123
45678910
11121314151617
18192021222324
25262728293031