Auto Progress on Blur

Add support for auto-progressing to the next page on blur. Useful for enabling auto-progression on Single Line Text and Name fields after these fields lose focus.

Warning! This is generally considered to be a bad UX. Use at your own discretion.

Instructions

  1. Install this snippet with our free Custom JavaScript plugin. https://gravitywiz.com/gravity-forms-code-chest/

  2. Add the gppt-auto-progress-on-blur class to the desired fields’ CSS Class Name field setting.

Code

Filename: gppt-auto-progress-on-blur.js

/**
 * Gravity Perks // Page Transitions // Auto Progress on Blur
 * https://gravitywiz.com/documentation/gravity-forms-page-transitions/
 *
 * Add support for auto-progressing to the next page on blur. Useful for enabling auto-progression
 * on Single Line Text and Name fields after these fields lose focus.
 *
 * Warning! This is generally considered to be a bad UX. Use at your own discretion.
 *
 * Instructions:
 *
 * 1. Install this snippet with our free Custom JavaScript plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 *
 * 2. Add the `gppt-auto-progress-on-blur` class to the desired fields' CSS Class Name field setting.
 */
$( '.gppt-auto-progress-on-blur' ).each( function() {
	$( this ).find( ':input:last' ).on( 'blur', function() {
		$( this ).trigger( 'gpptAutoProgress' );
	} );
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.