Adding custom behaviors to a text_field?

D

doolittle

Hello, I'm sure most of you have seen the forms, where people fill the
default value of a textbox with the field title, and then when you
click it, it empties the field for data to be entered. As I am fairly
new to ruby and rails, I am looking for an easy way to modify the
default behavior of a text_field, enabling it to create that effect.
I'm wondering if i should write a new helper function all together to
create this, or if there is simply a way to modify the existing
text_field behavior - as it will now have to handle displaying the
title, or if a value exists - the value. (And of course, some sort of
JS intervention will have to occur)

Thanks for your assistance!
-Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top