Skip to content

Commit 818bf08

Browse files
committed
gw-all-fields-template.php: Updated :updated modifier to work with multi-input fields (e.g. Name, Email, Address).
1 parent 0c8de01 commit 818bf08

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

gravity-forms/gw-all-fields-template.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,16 @@ public function all_fields_extra_options( $value, $merge_tag, $modifiers, $field
264264
}
265265
break;
266266
case 'updated':
267-
// If current value matches original value, it was not changed so we skip it.
268-
if ( $this->original_entry[ $field['id'] ] == $value ) {
267+
if ( ! is_array( $raw_value ) ) {
268+
$raw_value = array( $field->id => $raw_value );
269+
}
270+
$has_change = false;
271+
foreach ( $raw_value as $input_id => $input_value ) {
272+
if ( rgar( $this->original_entry, $input_id ) != $input_value ) {
273+
$has_change = true;
274+
}
275+
}
276+
if ( ! $has_change ) {
269277
$value = false;
270278
}
271279
break;

0 commit comments

Comments
 (0)