I've been looking for a D7 solution to break up long node forms. While vertical tabs and horizontal tabs can usually get the job done, I think there is a case to be made for multi page forms. The reason I'm posting this to the Field Group module's issue que is that I think it's the perfect module to perform such a task.

Much like the vertical and horizontal tabs, these pages would be hidden via css and not actually be separate form pages.

*Wufoo has a great example of what a multi page form could look like. Watch the video for the best example.
http://wufoo.com/2009/11/17/create-sweet-multi-page-forms-with-wufoo/

What are everyones thoughts on this, am I in the right place, is this possible, is anyone else looking for this killer feature?

Comments

Stalski’s picture

This could be nice and it's not that difficult to implement.
Are you up for a patch?

bryancasler’s picture

I've never created a module or a patch for a module before. I can't make any rainbow unicorn promises. However, I will look later today and see if this is something I might be able to do/figure out.

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

I thought about this request some more. I can image in very very large forms it makes sense to try to lower the load on the pages. However, in most cases and even in large forms, I don't know if the performance gain would be big.

Why do you want to feature exactly? I don't really see much benefit for this, especially as you described it would not be a real other page. Isn't that precisely how field_group>horizontal tabs currently work?

bryancasler’s picture

I've been thinking about the same thing myself and I've concluded that there are two distinguishing features between a horizontal tabs solution and a multi-page solution that can not be corrected for via CSS.

  1. Navigation at the bottom of the form, showing a way to navigate backwards and forwards.
    http://awesomescreenshot.com/090dsk0d1
  2. Submit form option is only visible on the last page.
    http://awesomescreenshot.com/0a1dsk340

The biggest benefits of having multiple pages are usability and screen real estate. I'll take a real world example I'm working with right now. Here are all the fields and fieldgroups I'm using http://awesomescreenshot.com/0d0dsnmcf

Here is what this form looks like with Vertical Tabs on a screen.
http://awesomescreenshot.com/030dso199 (1280x1024 resolution)
http://awesomescreenshot.com/055dss179 (1024x768 resolution)

Here is what this form looks like with Horizontal Tabs on a screen.
http://awesomescreenshot.com/003dsqaa9 (1280x1024 resolution)
http://awesomescreenshot.com/03adsrz52 (1024x768 resolution)

Roughly 55% of my users over the last year have had a screen resolution equal to or smaller than 800px wide, so I'm always concerned about screen real estate. If the user has 1024x768 resolution and is using the Seven admin theme, then the node/edit page has 855px horizontally that are usable. Using Vertical tabs will reduce that usable space to 601px. Things only get worse if you use the overlay module, 477px.

My users are not technically inclined, many are older, and are not very adventurous in exploring their form options. When I have vertical tabs or horizontal tabs the following scenario often happens. The user begins filling out the first tab (title, body, etc...). As they scroll down to complete the form they loose sight of their other options http://awesomescreenshot.com/0eadst2c8). Unless they've memorized the other options available to them or decided that scrolling up is more tempting than clicking "Save" and being done, I'm SOL.

To combat this behavior I could start putting everything I want them to fill out on the same tab, but then that defeats the purpose of having tabs to begin with. I'm no UX expert, but having the ability to craft a navigated experience for lengthy forms via multiple pages appears to be a powerful solution. I've read Steve Krug's "Don't Make Me Think" and I take his advice to heart. I want to make my forms as simple as possible to complete.

I hope this answers your questions of why I would want this feature and what benefit it would have. I think the idea of saving between page loads is an excellent one, but when posting this initially I wanted to keep this request as simple as possible. What are your thoughts?

Stalski’s picture

Status: Postponed (maintainer needs more info) » Needs work

This is some nice explanation, screenshots. You certainly convinced me.
I keep my response at heart of not having to do it in a multipage (refresh / ajax) way, but would prefer to do this technique in one page but with a new field_group format type.
I am thinking of a good name but I think the best would be to have a "multipage" and a "multipage page" if you know what I mean.
This would be a new library of basic javascript and css, just like I did for horizontal tabs. The server side will only prepare some visibility controls, so the step 1 is active (to get focus by css/js).

In a later phase we could consider to have "multipage" have an option "load in separate pages" which would mean there is a technique to only show part of the form (per bootstrap). This would also be hard on the submission, meaning we need to know when to save. Only at the end as entended? step by step as It makes more sense in some cases ...

So I will create such a thing with your screenshots (2 and 3) with the next and previous to have a nice way of tackling use cases as you are experiencing.

I really appreciate your feedback. Thx

Stalski’s picture

Status: Needs work » Needs review

Added to git and ready for testing.
Note the option on the multipage group to indicate whether buttons need to move to the last pane or stay ungrouped.

bryancasler’s picture

Thank you so much. I wanted to let you know I've kept this tab open on my browser for the last 12 days. Unfortunately work de-prioritized my drupal work, and now I finally can get back to the good stuff! I'll take a look at this over the weekend and see what feedback I can give.

Stalski’s picture

Ok thanx.
I'll now the request will come for a link to open a modal to for instance register or fill in some other multi-pageable form.
However I think that can be created in various ways depending on the modal framework the site uses to begin with.
Looking forward for the feedback.

bryancasler’s picture

I created a blog with two multi-page page's. Below is a screenshot of each page with feedback marked on it.

*I'm using the most recent git version.

Page 1
http://awesomescreenshot.com/02efc4d9c

Page 2
http://awesomescreenshot.com/0c3fc4nd8

Sorry the markup is not that pretty, but I wanted to get you this feedback that I've been late on.

What are your thoughts?

bryancasler’s picture

I just found this in an old bookmarks folder. This might save you a lot of work, check it out.
http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx

bryancasler’s picture

I also just found this new module. http://drupal.org/project/formflow

I haven't played with it yet, but it seems nearly identical to what you were working on here.

ben_scott’s picture

Hi -

I'm the author of the http://drupal.org/project/formflow module & part of it does exactly the same as you're building now (thanks to @animelion for pointing it out). Please help yourself to the code if you think it'd be useful & let me know if you'd like me to lend a hand. When this functionality is in the field group module I'll remove it from formflow.

btw there are a couple of usability issues I ran into when building mine:

1. Relating to comment #9, screenshot 1. I added everything not included in a group to the last page - so all the node settings stuff (menu etc.,) won't clutter up every step in the form. It'd probably be better if you could select where in the form these should be output, but this seemed the easiest way to fix the problem.

2. Users should be allowed to submit the form when there are no more required fields in subsequent steps.

Cheers,

Ben

Anonymous’s picture

StatusFileSize
new19.5 KB
new6.88 KB

I tested out the mutlipage functionality recently added. It's a wonderful solution for loading a long form once, then splitting it out into manageable sections. This will be popular where a simple solution is sought for unwieldy node forms. Big +1

It was easy to set up on the node content type page and the page stepping works very well.

I found a small bug / layout problem in the final page submit buttons (sc67.png) The extra 'search' button was a WTF, but it seems to act as a standard submit button without error? The 'previous' button might be styled the same as the other buttons, and it would be fantastic if all buttons could line up in a row as suggested in #9.

An option to put the 'additional_settings' vertical tab (sc82.png) on the final page above the submit buttons where it would appear on a regular node page would be useful. In many cases, and in forms with several page steps, seeing it on every step is unnecessary and clutters an otherwise modest use of screen space.

Top job, I'm loving it!!

If I can assist with a patch for any/all of the above or write up a 'how to' for the mutistep functionality, I'd be only too happy to do so :)

Stalski’s picture

Status: Needs review » Needs work

I will clean up the issue queue of field_group and then move over to this issue.
The propositions are great and take over this functionality from formflow sounds good to me.

So if somebody is up for it, please go ahead.
Please DO update this issue accordingly so everyone sees where we're at. Submit the work in a patch so somebody else can easily take over.
Thx people.

- EDIT - I also like all suggested functionality in #9. And I also think we could learn (or use) from that jquery plugin project.

Stalski’s picture

Nobody started this yet? I would like to pick in somewhere :)

Stalski’s picture

Assigned: Unassigned » Stalski

I will look at the jquery plugin and the generic formflow module. I can already say that the approach is too generic to be just pulled out of formflow. That module does a lot of extra things like render, validate, submit handlers ... that we don't need.

Description of all features

Title of each step should have extra css class to indicate it's the active one (default)
We need to consider here that the label of a group can be "Step 2 of 4: Your address". We still need to have a counter system so fieldgroup multipage form element takes care of that. I think some configuration ca ben added to the multipage-group.
Subsequent pages/fieldgroups should be listed as well
These will have a class that indicates they are not active. Also note that this should be a configuration. I don't know if all cases will cover this. Sometimes you just want a simple form with not much text.
Change "Next" to "Next page"
We'll do that . This also include the previous link. Should we use all buttons or the previous as a link.?
Add page count
Add a page counter with a configuration to not display it or giving the format (like 1 / 3)
Move addtional settings from core to the last page
TBD
Stalski’s picture

In this latest commit, I did some refactoring so that pre_render function is delegated to the field_group_pre_render_[format_type] function if available. Clear the cache to activate new multipage_pane theming function.

bugfixes:
- The search button was moved by incorrect javascript. This is fixed.
- Next = Next page

features included:
- Option to move additional settings to the latest pane if available.
- Format configuration for the step header.
- Configuration with choice of format for a footer page counter.

Yet TODO:
- steps header. Create a system (preferably in javascript only) that will list all titles of the multipage panes and gather them as header.
- Theming for the buttons that moved to the latest pane.
- Decision to make on the previous link. Should this be a button as well or leave it as a link, like most systems.

Stalski’s picture

Status: Needs work » Needs review
Shadlington’s picture

Subscribing

Stalski’s picture

Fixed a bug in multipage count number. The registration form had too much of groups in the count. This should be the same as on normal user edit page.

bryancasler’s picture

Stalski, I'm not able to test this at the moment but I wanted to let you know that I think you hit everything in #16

bryancasler’s picture

Stumbled on this today, haven't used it, but thought I would share http://drupal.org/project/msnf

bryancasler’s picture

StatusFileSize
new63.9 KB
new3.94 KB
new9.41 KB
new9.47 KB

Had a chance to play around with the dev release, and WOW! you've done a ton of work.

Here is a screenshot using the Seven admin theme.
http://drupal.org/files/issues/Create%20Article%20%20%20playground-defau...

This can be fixed by removing "padding-top: 10px;" from ".multipage-button{" in multipage.css
http://drupal.org/files/issues/Create%20Article%20%20%20playground-fixed...

I'm confused as to the purpose of the "no-start" select list. What does this do?
http://drupal.org/files/issues/Article%20%20%20playground-no-start.png

Multipage support is looking really good. Thanks so much for the fantastic work.

bryancasler’s picture

StatusFileSize
new26.64 KB

Adding this CSS will nicely move over the page counter

.multipage-counter{
float: right;
margin-right: 5px;
height: 0;
position: relative;
top: 1em;
}

http://drupal.org/files/issues/Create%20Article%20%20%20playground-count...

bryancasler’s picture

StatusFileSize
new23.72 KB

Here is my attempt at copying the Google UI. This was tested only with the seven admin theme.

Screenshot http://drupal.org/files/issues/google-ui-copy.png
CSS http://pastebin.com/tUQkcCup

bryancasler’s picture

Stumbled on this now too. http://drupal.org/project/multistep

Stalski’s picture

The start / no-start is to indicate which multipage pane is the active one. I could imagine in some cases you would want the people to end up in the second step as the first one is configured with most basic information that is never changed. Or something in that direction.
I don't know if this is worth what it is, but apparently when I wrote it, I thought it did. That's the problem of developers :p they do what they want

The CSS fixed are pushed to git, except for http://pastebin.com/tUQkcCup due to overload on pastebin. So I'll wait for that.

Stalski’s picture

The CSS looks nice.
Although I like it very much, I am not sure if we can just add the colors and buttons as proposed.
I pushed the code to git, but I definitely would like some feedback on the styling.

Shoot people!

bryancasler’s picture

I didn't expect the google-ui-emulation css to get committed :) I was just offering up the styling for other peeps to use.

If you want to commit it, here is a slightly better version with a few things I missed yesterday
http://pastebin.com/Aebnd9Kw

Stalski’s picture

There is still a problem with the css of the previous button. It aligns top and should be middle.
I would also prefer the color only white and not that fancy :) I think that's something for the custom themes, no?

bryancasler’s picture

I'll take another look at this next week and see if I can clean it up to be more robust and generic.

Stalski’s picture

You can even add something like a setting on how it's displayed and depend you css or even css file that gets included on it ;)
Go nuts

Stalski’s picture

Status: Needs review » Needs work
bryancasler’s picture

Just wanted to let you know this is still on my radar to work on.

mrfelton’s picture

Not so sure about including such comprehensive Google style css. It looks nice, but how many sites want their submit buttons to look like Google's I think ythat css included in modules should only be very basic - that that is needed in order for the module to function well.

Also, I don't think every line of this css should include the !important keyword. !important should rarely ever be used, as it totally screws up the natural hierarchy of css overrides. This only serves to make it even more difficult for themes to override these Google styles.

mrfelton’s picture

Clicking the Next or Previous buttons should probably scroll the page up to the top. At the moment, if you have one page of the multipage form thats quite long, and the next page is very short, when you click the next button to go from the long page to the short page, you then have to scroll up to be able to see any of the form elements on the short page, as they are all right at the top.

jaxxham’s picture

I have the same question about the scroll issue in the comment above - is there a javascript fix we can use for this?

mrfelton’s picture

In IE7, this throws up


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Timestamp: Tue, 8 Nov 2011 13:59:18 UTC


Message: Unexpected call to method or property access.
Line: 16
Char: 56222
Code: 0
URI: http://test.local/sites/all/modules/contrib/jquery_update/replace/jquery/jquery.min.js?v=1.5.2

mrfelton’s picture

Problem seems to be in line 135 of multipage.js:

this.nextLink.append('<span id="active-multipage-control" class="element-invisible">' + Drupal.t('(active page)') + '</span>');
mrfelton’s picture

StatusFileSize
new630 bytes

This is not a fix, but a workaround as I need it working right now. Commenting out the line seems to have no adverse affect. The line is somefor screen readers, which I'm not bothered about right now. Patch attached so I can include in drush make.

mrfelton’s picture

I created a separate issue for the scroll problem so that it doesn't get lost in this long and varied thread. #1341996: Next and previous buttons should scroll to top on multipage forms

Is it still useful to keep this thread open, since everything in here has already been committed?

mrfelton’s picture

New issue also created for the IE error I mentioned in #38 and #39. #1342006: JS error in multipage forms in IE. I don't see any point in hiding it away in here.

digitopo’s picture

Is there any word on the page listing functionality?

So you can easily jump to different parts/pages of the form?

brightbold’s picture

Agree with #43 — I'd love to see the page listing functionality. My use case is a lengthy application that people may want to take their time filling out, so it would be nice for them to be able to get a sense of what information is coming up and to be able to jump around without having to go through each page of the form in order.

Stalski’s picture

Status: Needs work » Postponed (maintainer needs more info)

What are the remaining tasks for this one? I would prefer to close this one as it is a bit messy and unmaintainable. I suppose other issue with specific problems already have come around and there might be more requests included here somewhere, not sure anymore.

Before I close this, can anyone say what is remaining, and please open a separate issue for that?

nils.destoop’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (works as designed)