diff --git a/gp-unique-id/gpuid-dynamic-population.php b/gp-unique-id/gpuid-dynamic-population.php index d310b2804..f113af1de 100644 --- a/gp-unique-id/gpuid-dynamic-population.php +++ b/gp-unique-id/gpuid-dynamic-population.php @@ -11,6 +11,13 @@ */ add_filter( 'gform_field_value_uid', function( $value, $field ) { + static $processing = array(); + $key = $field->formId . '_' . $field->id; + if ( isset( $processing[ $key ] ) ) { + return $value; + } + $processing[ $key ] = true; + // Update what type of unique ID you would like to generate. Accepts 'alphanumeric', 'numeric', or 'sequential'. $type_of_id = 'alphanumeric'; @@ -28,5 +35,6 @@ $value = $gw_uid; } + unset( $processing[ $key ] ); return $value; }, 10, 2 );