Hi! I'm using field_group with the bootstrap theme and I had a need for some custom workflow on a multipage form. In particular, I needed to show or hide pages 3 or 4 (out of 4 total) depending on a choice made on the first page. As a consequence, I needed to move the form submit button and hide or disable the next & previous buttons depending on a choice made on the first page.

This patch makes that task easier by moving the code that renders the next & previous buttons into a member function and by moving the code that moves the form submit button to the last pane into the "mulitpage" theme function.

This patch should not change observable behavior; it just makes certain extensions of multipage a little easier. I've tested a good bit with my setup, but I haven't tested on a stock install. Reviews & suggestions are welcome, of course.

Patch was originally written against 7.x-1.1; untested rebase against 7.x-1.x is attached second.

Comments

vickytnz’s picture

While we're at it, could we control (or reverse) the order of the next/previous buttons? It should be previous|next to be in line with standards for the web (and accessibility!)

chris matthews’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Assigned: ezheidtmann » Unassigned
Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch to multipage.js does not apply to the latest field_group 7.x-1.x-dev and if still applicable needs a reroll.

Checking patch multipage/multipage.js...
error: while searching for:
(function ($) {

/**
 * This script transforms a set of wrappers into a stack of multipage pages. 
 * Another pane can be entered by clicking next/previous.
 *
 */

error: patch failed: multipage/multipage.js:1
error: multipage/multipage.js: patch does not apply
nils.destoop’s picture

Status: Needs work » Closed (won't fix)