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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Prashant T. (Guest)
on 2006-05-08 13:41
Hi,
I want to disable textbox in my page so that user can not modify its
contents. How can we do that in ruby?

Thanx,
Prash
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" />

-Nathan
Kevin O. (Guest)
on 2006-05-08 19:47
(Received via mailing list)
On Monday, May 08, 2006, at 3:51 PM,  wrote:
>> > Hi,
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>_______________________________________________
>Rails mailing list
>removed_email_address@domain.invalid
>http://lists.rubyonrails.org/mailman/listinfo/rails

or...

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

_Kevin
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.