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.
8c70506408fddb9740b4de7339055c77?d=identicon&s=25 Prashant Tiwari (tiwaripk)
on 2006-05-08 11:41
I want to disable textbox in my page so that user can not modify its
contents. How can we do that in ruby?

B34e109290c7907c5df370eab11c7a4a?d=identicon&s=25 Vikrant Rathore (Guest)
on 2006-05-08 12:09
(Received via mailing list)
This is not related to ruby but html.

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

5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-05-08 17: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" %>

F0aea0642481aab7cb7851b6c9a10489?d=identicon&s=25 Dave Davidson (sp00nyg)
on 2006-05-09 14: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.