Forum: Ruby on Rails How to disable textbox in Ruby?

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.
Prashant T. (Guest)
on 2006-05-08 13:41
I want to disable textbox in my page so that user can not modify its
contents. How can we do that in ruby?

Vikrant Rathore (Guest)
on 2006-05-08 14:09
(Received via mailing list)
This is not related to ruby but html.

Please change the view code to make it enable or disable.
unknown (Guest)
on 2006-05-08 18:54
(Received via mailing list)
<input type="text" disabled="disabled" value="blah" />

Kevin O. (Guest)
on 2006-05-08 19:47
(Received via mailing list)
On Monday, May 08, 2006, at 3:51 PM,  wrote:
>> > Hi,
>Rails mailing list


<%= text_field 'object', 'method', "disabled"=>"disabled" %>

Dave D. (Guest)
on 2006-05-09 16:51
(Received via mailing list)
> <%= text_field 'object', 'method', "disabled"=>"disabled" %>

"readonly" will also work.
This topic is locked and can not be replied to.