Style on _fields

How can I modify the style of a RoR field like text_field or
password_field? I can use input in css, but how do I add a class?

On 7/8/06, PÃ¥l Bergström [email protected] wrote:

How can I modify the style of a RoR field like text_field or
password_field? I can use input in css, but how do I add a class?

The class option needs to go into the options hash

<%= text_field object, method, :class => ‘my_class’ -%>

Almost everything that you put into the options hash will show up as
attributes and values in the html tag

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