1. Home
  2. Snippets
  3. Disable scroll animation on multi page forms

Disable scroll animation on multi page forms

The user’s view will, by default, be pulled back to the top when changing pages on a multipage form. This can be disabled for all forms, however, by adding the following code to your functions.php file:

<?php
/**
 * Disable multipage scroll
 *
 */
function wpf_dev_disable_multipage_scroll() {
	?>
	<script type="text/javascript">window.wpforms_pageScroll = false;</script>
	<?php
}
add_action( 'wpforms_wp_footer', 'wpf_dev_disable_multipage_scroll' );
Updated on November 20, 2017

Was this article helpful?