Form Label Helper plugin

Plugin details

The plugin introduces 3 helpers label_tag, label_for and f.label (FormBuilder helper)

Websitehttp://jroller.com/page/dscataglini Repositoryhttp://simple-rails-plugins.googlecode.com/svn/form-label-helper/ Author Diego Scataglini Tags FormHelper LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://simple-rails-plugins.googlecode.com/svn/form-label-helper/

Usage:

label_tag "First Name", :for => "user_first_name", :accesskey => "F"


or

label_for :user, :first_name

or

f.label :first_name


For the exception of the label_tag in which you need to specify an accesskey option if you want it, for label_for and f.label the default is that the helpers figure out the first possible available letter to be used as access key. So in the previous case the output is:

< label for="user_first_name">First Name< /label>


label_for and f.label can take 2 extra parameters beside the usual suspects, :text (string) to be used instead of method.humanize and :skipauto_accesskey (bool) if you don't want to create the accesskey automagically.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: maxim_kulkin, about 1 year ago