From 054b0c3903bb9f272181463b4583ae3a22caafef Mon Sep 17 00:00:00 2001 From: puresyntax71 <34715246+puresyntax71@users.noreply.github.com> Date: Sat, 16 Sep 2023 02:20:03 +0800 Subject: [PATCH] Add reset for birth_date. --- js/webform_civicrm_forms.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/webform_civicrm_forms.js b/js/webform_civicrm_forms.js index aa95d59b3..d0e68c6da 100644 --- a/js/webform_civicrm_forms.js +++ b/js/webform_civicrm_forms.js @@ -164,6 +164,9 @@ var wfCivi = (function (D, $, drupalSettings, once) { $(':input[id$="month"]', $wrapper).val(parseInt(date[1], 10)).trigger('change', 'webform_civicrm:autofill'); $(':input[id$="day"]', $wrapper).val(parseInt(date[2], 10)).trigger('change', 'webform_civicrm:autofill'); } + else { + $(':input', this).val('').trigger('change', 'webform_civicrm:reset');; + } } else { $(':input', this).not(':radio, :checkbox, :button, :submit, :file, .form-file').each(function() {