Wow, this multipage feature is really slick. Found a small bug though, which is that the submit button is always moved to the last page, and the additional fields are always moved as well. This is because of this line:

drupal_add_js(array('multipage_move_submit' => $move_button, 'multipage_move_additional' => $move_additional), 'setting'); 

If deselected, $move_button and $move_additional become 0, which is converted to a string "0" in json_encode. Long story short, casting to a boolean fixes things:

drupal_add_js(array('multipage_move_submit' => (bool) $move_button, 'multipage_move_additional' => (bool) $move_additional), 'setting'); 

Patch is attached. Also, I haven't tackled this here, but using the global namespace for javascript settings (Drupal.settings.multipage_move_submit) vs a per-instance namespace (Drupal.settings.group_CONTAINER_NAME.multipage_move_submit) may prevent some issues down the road.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bryancasler’s picture

subscribe

Stalski’s picture

True and true. Thx for pointing it out.
I'll add the patch and work on the javascript :)

Stalski’s picture

Fixed the module namespace as well and pushed to git. Seems to work here.

Hydra’s picture

Status: Needs review » Reviewed & tested by the community

can confirm this

Stalski’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Ok thx

ghosts’s picture

Thanks for the module. It's exactly what I needed.

I'd actually like to have the submit button and additional fields on the last page of the multipage group. Anyway to revert?

Or, any suggestions (at the very least) to have the submit button only appear on the last page? I'm not very Javascript savvy.

Stalski’s picture

This is by default included in the settings of the multipage settings! (not the multipage pane)
So just click in your multipage wrapper group and configure that