Custom Field Refresh Trigger

Code

Filename: gppa-custom-refresh-trigger.js

/**
 * Gravity Perks // Populate Anything // Custom Field Refresh Trigger
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
// Update "1" and "2" to the field IDs that should trigger a Populate Anything refresh.
$( '#field_GFFORMID_1, #field_GFFORMID_2' ).find( 'input' ).on( 'change', function() {
	// Update "5" to the ID of the field that should be refreshed.
	window.gppaForms[ GFFORMID ].bulkBatchedAjax( [ { field: 5 } ] );
} );

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.