Skip to content

Commit 7e6dacc

Browse files
author
Mike van den Hoek
committed
(refactor): clear values of custom fields when validations fail for conditional logic
1 parent 9062798 commit 7e6dacc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/PrefillGravityForms/GravityForms/Fields/AgeCheckField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function get_field_input($form, $value = '', $entry = null)
118118
if (! $this->check_age($dateOfBirth)) {
119119
return $this->format_field_input(
120120
$form,
121-
$value,
121+
'',
122122
$this->get_check_failed_message(),
123123
$this->get_error_svg(),
124124
self::AGE_CHECK_VALIDATION_FAILED_CSS_CLASS

src/PrefillGravityForms/GravityForms/Fields/MunicipalityCheckField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function get_field_input($form, $value = '', $entry = null)
116116
if (! $this->check_municipality_code($municipalityCodeSetting, $municipalityCode)) {
117117
return $this->format_field_input(
118118
$form,
119-
$value,
119+
'',
120120
$this->get_check_failed_message(),
121121
$this->get_error_svg(),
122122
self::MUNICIPALITY_CHECK_VALIDATION_FAILED_CSS_CLASS

0 commit comments

Comments
 (0)