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.
Comment | File | Size | Author |
---|---|---|---|
move-submit-and-multiple-fix-field_group.patch | 897 bytes | rbayliss |
Comments
Comment #1
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #2
Stalski CreditAttribution: Stalski commentedTrue and true. Thx for pointing it out.
I'll add the patch and work on the javascript :)
Comment #3
Stalski CreditAttribution: Stalski commentedFixed the module namespace as well and pushed to git. Seems to work here.
Comment #4
Hydra CreditAttribution: Hydra commentedcan confirm this
Comment #5
Stalski CreditAttribution: Stalski commentedOk thx
Comment #6
ghosts CreditAttribution: ghosts commentedThanks 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.
Comment #7
Stalski CreditAttribution: Stalski commentedThis 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