Skip to content

Commit

Permalink
Fixed issue where functionality was applying to fields that were not …
Browse files Browse the repository at this point in the history
…populated by Populate Anything.
  • Loading branch information
spivurno authored Apr 15, 2022
1 parent 617223e commit fe19c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gp-populate-anything/gppa-force-rehydration-on-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
add_filter( 'gform_get_field_value', function( $value, $entry, $field ) {
static $_gppa_forcing_hydration;
if ( GFForms::get_page() === 'entry_detail_edit' && ! $_gppa_forcing_hydration ) {
if ( GFForms::get_page() === 'entry_detail_edit' && ! $_gppa_forcing_hydration && gp_populate_anything()->is_field_dynamically_populated( $field ) ) {
$_gppa_forcing_hydration = true;
$hydrated_field = gp_populate_anything()->hydrate_field( $field, GFAPI::get_form( $field->formId ), $entry, $entry );
$value = $hydrated_field['field_value'];
Expand Down

0 comments on commit fe19c36

Please sign in to comment.