# Dissabled text field but still post its value on submit

**URL:** <https://www.ruby-forum.com/t/dissabled-text-field-but-still-post-its-value-on-submit/161618>\
**Category:** Rails\
**Created:** [February 27, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/dissabled-text-field-but-still-post-its-value-on-submit/161618 "2009-02-27T22:07:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [February 27, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/dissabled-text-field-but-still-post-its-value-on-submit/161618/1 "2009-02-27T22:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [February 27, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/dissabled-text-field-but-still-post-its-value-on-submit/161618/2 "2009-02-27T22:10:42Z")

</div>

In this case, you’ll have to use :readonly =\> true, not disabled.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)

On Fri, Feb 27, 2009 at 6:07 PM, comopasta Gr

---

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [February 27, 2009, 10:22pm UTC](https://www.ruby-forum.com/t/dissabled-text-field-but-still-post-its-value-on-submit/161618/3 "2009-02-27T22:22:22Z")

</div>

Yeah thanks a lot MaurÃ­cio!

Cheers!
