Hello everyone I have the following problem. I have a model name "products" Products -id (by default) -code -name -description -quantity and in one of the forms I need that if I write the code, the others fields be filled automatically with the right value. How can I do this?? any gem?? Hope you can help me Thanks -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can call ajax request on change or on lost focus of the code field For send ajax request you can do observe_field or use remote_function - Chirag Shah http://blogofchirag.blogspot.com/ Angelo Cordova wrote in post #1013448:> Hello everyone > > I have the following problem. > > I have a model name "products" > > Products > -id (by default) > -code > -name > -description > -quantity > > and in one of the forms I need that if I write the code, the others > fields be filled automatically with the right value. > > How can I do this?? any gem?? > > Hope you can help me > > Thanks-- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for your answer do you have any link to a site with examples or something like that I really don''t know much about ajax On Jul 28, 1:20 am, Chirag Shah <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> You can call ajax request on change or on lost focus of the code field > For send ajax request you can do observe_field or use remote_function > > - Chirag Shahhttp://blogofchirag.blogspot.com/ > > Angelo Cordova wrote in post #1013448: > > > > > > > > > > > Hello everyone > > > I have the following problem. > > > I have a model name "products" > > > Products > > -id (by default) > > -code > > -name > > -description > > -quantity > > > and in one of the forms I need that if I write the code, the others > > fields be filled automatically with the right value. > > > How can I do this?? any gem?? > > > Hope you can help me > > > Thanks > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.