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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mrfelton’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Active » Needs review
FileSize
904 bytes
bryancasler’s picture

Status: Needs review » Reviewed & tested by the community

Simple enough patch. Works as expected, just had to clear cache. Thanks for solving this mrfelton!

nils.destoop’s picture

Status: Reviewed & tested by the community » Fixed

Changed the patch a bit. $('#page') is a bit hardcoded on theme. And a page group is not always on top of the page.
The window now pops to the multipage wrapper

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anniegreens’s picture

Patch rerolled from #1 with the addition of whitespace removal.

anniegreens’s picture

Sorry. Environment specific pathing removed from patch.

anniegreens’s picture

Re-rolled for latest dev using #page for those who want it. I'm still not convinced that the multipage group wrapper is the best solution, as it cuts off the top portion of the page that may be relevant.

kyleoliveira’s picture

The patch in #7 seems to work for me on simplytest.me. Is this not working for anyone? If not, any reason not to commit this?

katannshaw’s picture

@kyleoliveira:

FYI: Patch #7 worked great for me too. The only issue I had was when I also installed the Field Group Ajaxified Multipage module. For some reason, when you select the "Ajaxify" checkbox for a multipage group, the Next and Previous buttons don't scroll to the top. But if I un-select that checkbox, it works fine.

I'm guessing that if anyone has an issue at this point, it probably has something to do with that module, not the Field Group module with this patch on its own. I've created an issue report for that module with this information here: https://drupal.org/node/2111709.

jantoine’s picture

Reroll of patch from #7. It seems that the issue was never reopened and comment #7 never addressed.

Status: Needs review » Needs work

The last submitted patch, 10: field_group-multipage-scroll-to-top-1341996-10.patch, failed testing.

Rob_Feature’s picture

I tried implementing the patch in #7 into version 7.x-1.5 and it fails....it looks like the .js never even fires. Maybe I'm missing something?

david.qdoscc’s picture

If the form is displaying in the administrative overlay, then then using #overlay-container rather than #page worked for me.

EDIT: but only in Edge browser - doh!

Nitesh Sethia’s picture

Status: Needs work » Needs review

#10 seems to be working for 7.x-1.5 version of the field_group module. We should plan to add this to the code as this would resolve the issue of scroll.

Thanks,
Nitesh Sethia

Status: Needs review » Needs work
Nitesh Sethia’s picture

Status: Needs work » Needs review
FileSize
713 bytes

We can remove the javascript code as it is not required.

Status: Needs review » Needs work
Nitesh Sethia’s picture

Status: Needs work » Needs review
FileSize
699 bytes

Rerolling the patch.

prashant.kabade’s picture

re-rolling patch for latest version 1.6 from #18

prashant.kabade’s picture

#19 is not working . Adding new