Skip to content

Commit 7e1442a

Browse files
authored
gw-field-to-field-conditional-logic.php: Fixed an issue with numeric comparison in field to field conditional logic.
1 parent 3f50b88 commit 7e1442a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gravity-forms/gw-field-to-field-conditional-logic.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ public function modify_rule( $rule, $form, $logic, $field_values, $entry ) {
265265
$_rule_cache[ $entry_id ][ $rule['value'] ] = $value;
266266
}
267267

268+
// Clean number values to ensure proper comparison.
269+
if ( GFCommon::is_numeric( $value ) ) {
270+
$value = GFCommon::clean_number( $value );
271+
}
272+
268273
$rule['value'] = $value;
269274

270275
return $rule;

0 commit comments

Comments
 (0)