Reputation: 1136
I need to implement a custom process bar (not progress bar) to map progress through a multi-step client project sequence. It has to be graphical, not just a breadcrumb trail, similar to this:
--- O --- O --- O --- O --- O
label label label label label
Each 0
above represents the graphical button that will be have separate states, :hover
and :active
and be a link to each page of the process so that the client can skip around and not have to follow a linear process.
The projects controller should handle the page views, with the first on being handled by a static page controller '/start_project'
. This is due to the need for the client to accept terms and conditions on the /start_project
page before they actually create a record in the database.
I need to know if there is a way to implement a process bar like this in Rails 3, with each step along the way reacting to its individual state. For instance, the first step, INTRO, should map to the /projects/new_intro.html.erb
page dynamically. Each page will have a form_for
element that fills in another part of the database.
I want a dynamic solution to avoid having to develop 11 individual graphics.
Any ideas?
Upvotes: 0
Views: 291
Reputation: 1136
After some research, I discovered that what I am implementing is a multi-step form map. There are several resources out there, including screencasts that show how to implement multi-step forms natively, or there is the wicked gem which does the same thing.
I am going to try to implement a native method first because I want to have the information saved to the database at the completion of each step, not just at the end of the form. This should allow me to implement the requirements of having both a [save] button and a [continue] button, the first which saves information but allows for continued editing, and the second which saves the information and moves the user to the next step of the form.
Upvotes: 1