Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Accessible Form Helper

Accessible Form Helper

AccessibleFormHelper creates “Prettier Accessible Forms”

  • http://www.alistapart.com/articles/prettyaccessibleforms

Example

<% accessible_form_for @post do |f| %>
<%= f.text_field :title, :required => true %>
<%= f.text_area :body %>
<%= f.check_box :secret, :label => "Private" %>
<% end %>

...returns:

<form action="http://www.example.com/posts" method="post">
<label for="post_title">Title * </label>
<input name="post[title]" size="30" type="text" id="post_title" value="Hello World" />
<label for="post_body">Body</label>
<textarea name="post[body]" id="post_body" rows="20" cols="40">Back to the hill and over it again!</textarea>
<label>
  <input checked="checked" name="post[secret]" type="checkbox" id="post_secret" value="1" />
  <input name="post[secret]" type="hidden" value="0" /> Private
</label>
</form>

Copyright© 2007 Joshua Peek, released under the MIT license

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly


Homepage: http://plugins.wh.joshpeek.com/browser/accessible_form_helper