Forum: Ruby on Rails Dissabled text field but still post its value on submit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
13d7a3ab12ec57e0d372d7115362cb91?d=identicon&s=25 comopasta Gr (comopasta)
on 2009-02-27 22:07
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
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-02-27 22:10
(Received via mailing list)
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
13d7a3ab12ec57e0d372d7115362cb91?d=identicon&s=25 comopasta Gr (comopasta)
on 2009-02-27 22:22
Yeah thanks a lot Maurício!

Cheers!
This topic is locked and can not be replied to.