uneditable text_field

<%= form.text_field :tags, :value => tags, :disabled=>"disabled" %>

disabled makes it uneditable, but when I submit my form, I suppose the
value of the input field becomes non-existant since it is disabled. What
workarounds are available?

Thanks

The best "workaround" would be to learn HTML. Start by reading here:

  <http://www.w3.org/TR/html401/interact/forms.html#h-17.4>

:: and specifically look at the "readonly" attribute :slight_smile:

FWIW,

I know html, but two issues:

1) I don't know how to add the readonly attribute into a text_field tag
2) I read that readonly is not widely suppported

I know html, but two issues:

1) I don't know how to add the readonly attribute into a text_field tag

Uh, wouldn't it be just like the disabled attribute you already used?

2) I read that readonly is not widely suppported

Read where? There's a lot of outdated information out there.

In any case, easy enough to test on the most common browsers.

Besides, if it's really a concern -- why make it a form field at all?