[Rails] Beginners partials question

2009-08-31 Thread Tz Le
I have an observe field for a select field. <%= f.label :type_id%> <%= f.select :type_id,RuleType.all.collect{|c| [c.description,c.id]} %> <%= observe_field 'type_id', :url => { :controller => 'rule_type', :action => 'List' }, :update => 'List', :with => 'id=+value' %>

[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 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 %> >>> <

[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 %> >> >> Ple

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

2009-08-25 Thread Tz Le
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 they change and the id is now 5 HERE I NEED TO CHECK THE VALUE SELECTED BY TH