Auto Submit After Uploads Finish

Instructions

Code

Filename: gpfup-auto-submit-after-uploads-finish.js

/**
 * Gravity Perks // File Upload Pro // Auto Submit After Uploads Finish
 * https://gravitywiz.com/documentation/gravity-forms-file-upload-pro/
 *
 * Instruction Video: https://www.loom.com/share/6349c239eaa341998792ff6be9810e10
 */
gform.addAction( 'gpfup_uploader_ready', function( gpfup ) {
	gpfup.Uploader.bind( 'UploadComplete', function() {
		if ( document.hidden ) {
			jQuery( 'form#gform_GFFORMID' ).submit();	
		}
	} );
} );

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.