Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedComment #2
bryancasler CreditAttribution: bryancasler commentedSimple enough patch. Works as expected, just had to clear cache. Thanks for solving this mrfelton!
Comment #3
nils.destoop CreditAttribution: nils.destoop commentedChanged 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
Comment #5
anniegreens CreditAttribution: anniegreens commentedPatch rerolled from #1 with the addition of whitespace removal.
Comment #6
anniegreens CreditAttribution: anniegreens commentedSorry. Environment specific pathing removed from patch.
Comment #7
anniegreens CreditAttribution: anniegreens commentedRe-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.Comment #8
kyleoliveira CreditAttribution: kyleoliveira commentedThe 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?
Comment #9
katannshaw CreditAttribution: katannshaw commented@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.
Comment #10
jantoine CreditAttribution: jantoine as a volunteer commentedReroll of patch from #7. It seems that the issue was never reopened and comment #7 never addressed.
Comment #12
Rob_Feature CreditAttribution: Rob_Feature commentedI 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?
Comment #13
david.qdoscc CreditAttribution: david.qdoscc commentedIf 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!
Comment #14
Nitesh Sethia CreditAttribution: Nitesh Sethia as a volunteer and at Syngenta commented#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
Comment #16
Nitesh Sethia CreditAttribution: Nitesh Sethia as a volunteer and at Syngenta commentedWe can remove the javascript code as it is not required.
Comment #18
Nitesh Sethia CreditAttribution: Nitesh Sethia as a volunteer and at Syngenta commentedRerolling the patch.
Comment #19
prashant.kabade CreditAttribution: prashant.kabade as a volunteer and commentedre-rolling patch for latest version 1.6 from #18Comment #20
prashant.kabade CreditAttribution: prashant.kabade as a volunteer and commented#19 is not working . Adding new