My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

Textarea With Status

Project moved to GitHub: http://github.com/alexaandru/TextAreaWithStatus

Overview

This plugin is extending builtin text_area and text_area_tag helpers with the ability to display chars left up to a specified limit.

Basically it turns this:

<%= f.text_area :description, :onkeyup => "limit_chars(this, 100, $('chars_left'))" %><br />
<span id="chars_left">You have <%= 100 - @object.description.length %> characters left. </span>

into this:

<%= f.text_area :description, :max_chars => 100 %>

You can also customize the status message.

Install & Setup

You can install it with:

script/plugin install http://text-area-with-status.googlecode.com/svn/tags/text_area_with_status

Upon install it will try to copy the needed .js file under public/javascripts folder and display the README. If that fails you can either try to manually run the install script like this:

ruby vendor/plugins/text_area_with_status/install.rb

or just manually copy the needed .js file. Please see the IncludedReadme for more detailed instructions if needed.

Powered by Google Project Hosting