It sounds like you want the default value to act sort of like a label, if so here's a little snippet I've used previously that works very nicely.
http://codesnippets.joyent.com/posts/show/478 Then format your input like this... <%= form.text_field :email, :value => "[email protected]" onclick => "clickclear(this, '[email protected]')" onblur => "clickrecall (this,'[email protected]'')" %> Just be sure that the 3 values here are all identical. On Aug 13, 1:14 pm, Stephan Meier <[email protected]> wrote: > Hey all, > > im not sure where to set a default value if a textfield is empty? > > For now i do it in the controller, and check if the submitted parameter > is blank. > But this seems not to be the best solution... > > Thanks for your help! > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

