comopasta Gr
2009-Feb-27 21:07 UTC
Dissabled text field but still post its value on submit
Hi, I have a text field that gets its updated value from a javascript function. So I don''t want the user to enter anything into the field. But I want the value to be part of the parameters when the form is submitted. The problem is that when I use :dissable => "true" on the text field its value is not sent on submit. How can I fix that, any idea? Cheers -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maurício Linhares
2009-Feb-27 21:09 UTC
Re: Dissabled text field but still post its value on submit
In this case, you''ll have to use :readonly => true, not disabled. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Fri, Feb 27, 2009 at 6:07 PM, comopasta Gr <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > I have a text field that gets its updated value from a javascript > function. So I don''t want the user to enter anything into the field. But > I want the value to be part of the parameters when the form is > submitted. > > The problem is that when I use :dissable => "true" on the text field its > value is not sent on submit. > > How can I fix that, any idea? > > Cheers > -- > 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
comopasta Gr
2009-Feb-27 21:22 UTC
Re: Dissabled text field but still post its value on submit
Yeah thanks a lot Maurício! Cheers! -- 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---