[Rails] Re: f.select onchange determine other fields in view

2009-08-26 Thread Tz Le
Lee Smith wrote: > Is this what you're trying to do? > > http://railscasts.com/episodes/88-dynamic-select-menus Thank you, Its similar. But all these posts are telling me based on one select to populate a second select. What if based on one select, I want to determine the other field- if its s

[Rails] Re: f.select onchange determine other fields in view

2009-08-26 Thread JL Smith
Is this what you're trying to do? http://railscasts.com/episodes/88-dynamic-select-menus --~--~-~--~~~---~--~~ 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

[Rails] Re: f.select onchange determine other fields in view

2009-08-26 Thread Tz Le
Tz Le wrote: > bill walton wrote: >> Hi Tz Le, >> On Tue, 2009-08-25 at 21:48 +0200, Tz Le wrote: >>> Now when they change and the id is now 5 >>> If its not 5 >>> I want >>> >>> <%= f.label :value %> >>> <%= f.text_field :value %> >>> >>> Please if you can tell me how to access the fir

[Rails] Re: f.select onchange determine other fields in view

2009-08-26 Thread Tz Le
bill walton wrote: > Hi Tz Le, > On Tue, 2009-08-25 at 21:48 +0200, Tz Le wrote: >> Now when they change and the id is now 5 >> If its not 5 >> I want >> >> <%= f.label :value %> >> <%= f.text_field :value %> >> >> Please if you can tell me how to access the first select- do I set an >>

[Rails] Re: f.select onchange determine other fields in view

2009-08-25 Thread bill walton
Hi Tz Le, On Tue, 2009-08-25 at 21:48 +0200, Tz Le wrote: > I am trying to create a view/form that has a dropdown > > > <%= f.label :type_id%> > <%= f.select :type_id,Type.all.collect{|c| [c.description,c.id]}, > :onchange=>"HERE I NEED TO DO SOMETHING WHAT?" %> > > > > Now when