How to add default value to text_field_with_auto_complete

I can’t find the way in rails api of how to add default value in
text_field_with_auto_complete. Anyone know please teach me.
Thank you.

Am 13.07.2009 um 11:40 schrieb Thriving K.:

I can’t find the way in rails api of how to add default value in
text_field_with_auto_complete. Anyone know please teach me.

I come up with this after 20s of googling:

text_field_with_auto_complete foo, bar, :tag_options => { :value =>
“some default text” }

Doc for text_field_with_auto_complete is here
http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptMacrosHelper.html#M000579
, the tag_options hash can hold the same stuff as the options hash
in text_field_tag
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M002016
.

Felix

Thank you a lot, i will try harder next time

It works know , thank you
i come up with this

= text_field_with_auto_complete :projecttag, :name,{:value
=>“555”},{:skip_style => true}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs