Skip to content

Commit

Permalink
gppt-auto-progress-on-blur.js: Added new snippet.
Browse files Browse the repository at this point in the history
  • Loading branch information
spivurno authored Nov 9, 2023
1 parent 1e5310a commit 70d90e4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gp-page-transitions/gppt-auto-progress-on-blur.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* 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-custom-javascript/
*
* 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' );
} );
} );

0 comments on commit 70d90e4

Please sign in to comment.