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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
comopasta G. (Guest)
on 2009-02-27 23:07

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

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?

Maurício L. (Guest)
on 2009-02-27 23:10
(Received via mailing list)
In this case, you'll have to use :readonly => true, not disabled.

Maurício Linhares (pt-br) |

On Fri, Feb 27, 2009 at 6:07 PM, comopasta Gr
comopasta G. (Guest)
on 2009-02-27 23:22
Yeah thanks a lot Maurício!

This topic is locked and can not be replied to.