Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Easily create advanced tabbed forms. Works well with Rails + simple_form

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time


Javascript tabbed forms

How does it work?

Imagine the following form (with simple_form ofcourse ;)) in HAML code:

= simple_form_for resource do |form|
      %li= link_to t('.general'), '#', :rel => 'general'
      %li= link_to t('.contacts'), '#', :rel => 'contacts'
      %li= link_to t('.events'), '#', :rel => 'events'

  %fieldset.buttons t('.previous')
    %button= t('.submit') t('.next')

All section tags will now automaticly be divided in seperate tabs. When a user hits save an there is an error on a specific tab, the javascript lib will automaticly switch to that tab.

Just be sure that the ID's of your section's are the same as in the rel attribute of your tab links.

License and credits

Use it and have fun with it! Comments, cakes and hugs are welcome! Just stick to the license!

Copyright 2011, Diederick Lawson - Altovista. Released under the FreeBSD license.

Something went wrong with that request. Please try again.