Skip to content

Commit

Permalink
Create gppa-listen-for-updates-on-specific-field.js
Browse files Browse the repository at this point in the history
  • Loading branch information
spivurno authored Apr 14, 2022
1 parent 6519908 commit 617223e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gp-populate-anything/gppa-listen-for-updates-on-specific-field.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Gravity Perks // Populate Anything // Listen for Populate Anything Updates on a Specific Field
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/
*/
$( document ).on( 'gppa_updated_batch_fields', function( e, formId, updatedFieldIDs ) {
var targetFieldId = 3;
if ( parseInt( formId ) === GFFORMID && $.inArray( String( targetFieldId ), updatedFieldIDs ) !== -1 ) {
console.log( 'Target field updated!' );
}
} );

0 comments on commit 617223e

Please sign in to comment.