Uneditable text input field

Does anyone know if it is possible to create an uneditable text input
field using the form tag helpers?

On Apr 26, 6:13 pm, ES [email protected] wrote:

Does anyone know if it is possible to create an uneditable text input
field using the form tag helpers?

You should be able to set the disabled or readonly attribute (these
aren’t the same - make sure you use the one most appropriate for your
usage)

Fred

nice, thanks!

On Apr 26, 7:18 pm, Frederick C. [email protected]

Frederick C. wrote:

On Apr 26, 6:13�pm, ES [email protected] wrote:

Does anyone know if it is possible to create an uneditable text input
field using the form tag helpers?

You should be able to set the disabled or readonly attribute (these
aren’t the same - make sure you use the one most appropriate for your
usage)

But this is usually poor UI design. In general, it’s better to either
leave the control enabled or use static text.

And of course, don’t rely on a disabled control to prevent users from
changing things. A malicious user could send a specially crafted
request to your application that would edit a “disabled” parameter…

Fred

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs