HI ALL, I want to add values present in hash text_fields on form after form is displayed. is it possible, how can i do it.
on 2009-03-14 13:43
on 2009-03-14 17:44
HI Nilesh Your Question is not clear, Can you explain with some example On Sat, Mar 14, 2009 at 6:13 PM, Nilesh Kulkarni <
on 2009-03-14 18:44
for this text_area: <%= text_area( "user", "tasks", :cols=>30, :rows=>10) %> default value would be to set @user.tasks = text_fields[:user_tasks] in your controller. hope this is what you were looking for.
on 2009-03-16 06:01
senthil raja wrote: > HI Nilesh > > Your Question is not clear, > > Can you explain with some example > > On Sat, Mar 14, 2009 at 6:13 PM, Nilesh Kulkarni < ok I am fetching value from database and displaying it in text_area ,consider book table.I have three fields in database year,author and title , 2008,james,me and you is displayed in text_area. now i have hash which contains different values year,author and title say 2007,john and happy days. I want to replace values of year,author and title from text_area with values in hash. how can i do that? year 2008 author james title me and you
on 2009-03-16 07:50
well, you can do that like i posted before. only thing you have to add is maybe an ajax-call to reload that textarea. once you figured how to put default values into that text-area, and how to replace_html with ajax, this should be no problem. try it.