RWVHP

geeky initals

AccessibleFormBuilder has just been pushed out the door.

UPDATE This is the example ;)
  <% a_form_for :user, :url => users_path, :legend => "Login Details" do |f| %>
    <%= f.text_field :login, :label => "Username", :note => "This is visible to other users", :required => true %>
    <%= f.password_field :password, :label => "Password", :required => true %>
    <%= f.password_field :password_confirmation, :label => "Confirm Password", :required => true %>
    <%= f.separator "Personal Details" %>
    <%= f.text_field :firstname, :label => "First name", :required => true %>
    <%= f.text_field :lastname, :label => "Last name", :required => true %>
    <%= f.text_field :email, :label => "E-Mail", :required => true %>
    <%= f.separator "Location Details" %>
    <%= f.text_field :address, :label => "Location", :note => "(eg. New York, 90210, SE1 3SR)", :required => true %>
    <%= f.submit "Sign up" %>
  <% end %>

UPDATE Added HTML output

<form action="/users" class="aFrm" method="post"><div style="margin:0;padding:0"><input name="authenticity_token" type="hidden" value="e39d055ff60d1b5388fcf9864ffd1fa568160b9a" /></div><fieldset><legend>Login Details</legend><ol>
  <li><label for="user_login">Username:</label><input id="user_login" name="user[login]" size="30" type="text" /><span class="requiredField">*</span><em> This is visible to other users</em></li>
  <li><label for="user_password">Password:</label><input id="user_password" name="user[password]" size="30" type="password" /><span class="requiredField">*</span></li>

  <li><label for="user_password_confirmation">Confirm Password:</label><input id="user_password_confirmation" name="user[password_confirmation]" size="30" type="password" /><span class="requiredField">*</span></li>
      </ol>
  </fieldset>
  <fieldset><legend>Personal Details</legend>
    <ol>

  <li><label for="user_firstname">First name:</label><input id="user_firstname" name="user[firstname]" size="30" type="text" /><span class="requiredField">*</span></li>

  <li><label for="user_lastname">Last name:</label><input id="user_lastname" name="user[lastname]" size="30" type="text" /><span class="requiredField">*</span></li>
  <li><label for="user_email">E-Mail:</label><input id="user_email" name="user[email]" size="30" type="text" /><span class="requiredField">*</span></li>
      </ol>
  </fieldset>
  <fieldset><legend>Location Details</legend>
    <ol>

  <li><label for="user_address">Location:</label><input id="user_address" name="user[address]" size="30" type="text" /><span class="requiredField">*</span><em> (eg. New York, 90210, SE1 3SR)</em></li>
  <li><input name="commit" type="submit" value="Sign up" /></li>
</ol></fieldset></form>
Install with
git clone git://github.com/shift/accessible_form_builder.git vendor/plugins/accessible_form_builder

4 Responses to “AccessibleFormBuilder Usage and Example”

  1. David Says:

    Where is the example?

  2. Vincent Says:

    David, the example is the ERB confused.

  3. weepy Says:

    Hey

    don’t you think you should include the stylesheet with the plugin ?

  4. David Says:

    Is there an online example that uses it?

Sorry, comments are closed for this article.

About RWVHP

Photo of Vincent Palmer the site owner.

Vincent is a self-confessed geek, who's day job is as a Rails developer, outside of work he likes to play with home automation gadgets. He resides in Newcastle upon Tyne.

Page Sections

Copyright © 2008 Vincent Palmer