diff --git a/src/Element/WebformElementEncrypt.php b/src/Element/WebformElementEncrypt.php index 5836511..45644d6 100644 --- a/src/Element/WebformElementEncrypt.php +++ b/src/Element/WebformElementEncrypt.php @@ -97,6 +97,7 @@ class WebformElementEncrypt extends FormElement { } if (empty($config['settings'])) { + // Form has no encrypted elements, remove all webform_encrypt settings. $webform->unsetThirdPartySetting('webform_encrypt', 'element'); } else { diff --git a/tests/modules/webform_encrypt_test/config/install/webform.webform.test_encryption.yml b/tests/modules/webform_encrypt_test/config/install/webform.webform.test_encryption.yml index 7a4aedc..493dd1f 100644 --- a/tests/modules/webform_encrypt_test/config/install/webform.webform.test_encryption.yml +++ b/tests/modules/webform_encrypt_test/config/install/webform.webform.test_encryption.yml @@ -13,9 +13,6 @@ third_party_settings: test_text_area: encrypt: '1' encrypt_profile: test_encryption_profile - test_not_encrypted: - encrypt: '1' - encrypt_profile: test_encryption_profile open: null close: null uid: 1