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?
| Comment | File | Size | Author |
|---|---|---|---|
| #40 | 1167808-multipage-js-error-in-ie.patch | 630 bytes | mrfelton |
| #25 | google-ui-copy.png | 23.72 KB | bryancasler |
| #23 | Create Article playground-default.png | 9.47 KB | bryancasler |
| #23 | Create Article playground-fixed.png | 9.41 KB | bryancasler |
| #23 | Create Article playground-previous.png | 3.94 KB | bryancasler |
Comments
Comment #1
Stalski commentedThis could be nice and it's not that difficult to implement.
Are you up for a patch?
Comment #2
bryancasler commentedI'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.
Comment #3
Stalski commentedI 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?
Comment #4
bryancasler commentedI'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.
http://awesomescreenshot.com/090dsk0d1
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?
Comment #5
Stalski commentedThis 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
Comment #6
Stalski commentedAdded 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.
Comment #7
bryancasler commentedThank 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.
Comment #8
Stalski commentedOk 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.
Comment #9
bryancasler commentedI 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?
Comment #10
bryancasler commentedI 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
Comment #11
bryancasler commentedI 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.
Comment #12
ben_scott commentedHi -
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
Comment #13
Anonymous (not verified) commentedI 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 :)
Comment #14
Stalski commentedI 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.
Comment #15
Stalski commentedNobody started this yet? I would like to pick in somewhere :)
Comment #16
Stalski commentedI 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
Comment #17
Stalski commentedIn 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.
Comment #18
Stalski commentedComment #19
Shadlington commentedSubscribing
Comment #20
Stalski commentedFixed 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.
Comment #21
bryancasler commentedStalski, 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
Comment #22
bryancasler commentedStumbled on this today, haven't used it, but thought I would share http://drupal.org/project/msnf
Comment #23
bryancasler commentedHad 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.
Comment #24
bryancasler commentedAdding this CSS will nicely move over the page counter
http://drupal.org/files/issues/Create%20Article%20%20%20playground-count...
Comment #25
bryancasler commentedHere 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
Comment #26
bryancasler commentedStumbled on this now too. http://drupal.org/project/multistep
Comment #27
Stalski commentedThe 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.
Comment #28
Stalski commentedThe 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!
Comment #29
bryancasler commentedI 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
Comment #30
Stalski commentedThere 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?
Comment #31
bryancasler commentedI'll take another look at this next week and see if I can clean it up to be more robust and generic.
Comment #32
Stalski commentedYou 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
Comment #33
Stalski commentedComment #34
bryancasler commentedJust wanted to let you know this is still on my radar to work on.
Comment #35
mrfelton commentedNot 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.
Comment #36
mrfelton commentedClicking 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.
Comment #37
jaxxham commentedI have the same question about the scroll issue in the comment above - is there a javascript fix we can use for this?
Comment #38
mrfelton commentedIn IE7, this throws up
Comment #39
mrfelton commentedProblem seems to be in line 135 of multipage.js:
Comment #40
mrfelton commentedThis 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.
Comment #41
mrfelton commentedI 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?
Comment #42
mrfelton commentedNew 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.
Comment #43
digitopo commentedIs there any word on the page listing functionality?
So you can easily jump to different parts/pages of the form?
Comment #44
brightboldAgree 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.
Comment #45
Stalski commentedWhat 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?
Comment #46
nils.destoop commented