Here's a page that explains how to do this using JavaScript within the form builder syntax.

http://www.folksonomy.org/2008/12/22/rails-auto-clearing-input-field/

Note that any element like this will rely on JavaScript on the client to keep from submitting the default value. Be sure to check in your controller for that explicit value and ignore the search event in that case.

Walter

On Oct 3, 2010, at 12:18 PM, Anders_P wrote:

Thanks a lot! That worked.

Do you have any tips on my second question?

Anders

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to