Plugins - Form Helper CSS

StarAdd to favorites

This plugin enhances the default tag helpers to automatically add CSS classes to form elements. It’s similar to the enhanced_form_tag_helper plugin, but takes a different approach by directly intercepting the tag and content_tag methods, and should therefore work in all situations where form elements are created, especially the FormHelper and more exotic ones like button_to.

The following elements are enhanced:

  • input tags get their type as class name
  • submit and reset buttons additionally get the class name button
  • password fields additionally get the class name text
  • textarea tags get the class name text
  • select and button tags are not enhanced

If any helper options already specify a class, nothing will be changed. If you don’t want a class to be added, pass :class => nil.

Markus Koller

http://snafu.diarrhea.ch/software/rails#form_helper_css

http://dev.diarrhea.ch/svn/rails_plugins/trunk/form_helper_css

Rails' (MIT)

  • Currently 4.3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

View Extensions

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?