diff --git a/example-templates/dist/shop/_private/address/fields.twig b/example-templates/dist/shop/_private/address/fields.twig
index 77bfb0a8db..e0fa3299c4 100644
--- a/example-templates/dist/shop/_private/address/fields.twig
+++ b/example-templates/dist/shop/_private/address/fields.twig
@@ -198,29 +198,17 @@ Outputs address form fields for editing an address.
{% if showPrimaryCheckboxes %}
- {{ input('hidden', 'isPrimaryBilling', address.isPrimarybilling ? 1 : 0) }}
-
+ {{ hiddenInput('isPrimaryBilling', 0) }}
+
- {{ input('hidden', 'isPrimaryShipping', address.isPrimaryShipping ? 1 : 0) }}
-
+ {{ hiddenInput('isPrimaryShipping', 0) }}
+
{% endif %}
{% js %}
-{% if showPrimaryCheckboxes %}
-document.querySelectorAll('input[type=checkbox][data-primary-input]').forEach(el => {
- el.addEventListener('change', ev => {
- let primaryInput = document.querySelector(`input[name="${ev.target.dataset.primaryInput}"]`);
- if (ev.target.checked) {
- primaryInput.value = 1;
- } else {
- primaryInput.value = 0;
- }
- });
-});
-{% endif %}
document.querySelector('select#{{ 'countryCode'|namespaceInputId(addressName) }}').addEventListener('change', ev => {
const countryCode = ev.target.value;
diff --git a/example-templates/src/shop/_private/address/fields.twig b/example-templates/src/shop/_private/address/fields.twig
index 6fa6ebf00b..2af88ecfa4 100755
--- a/example-templates/src/shop/_private/address/fields.twig
+++ b/example-templates/src/shop/_private/address/fields.twig
@@ -198,30 +198,17 @@ Outputs address form fields for editing an address.
{% if showPrimaryCheckboxes %}
- {{ input('hidden', 'isPrimaryBilling', address.isPrimarybilling ? 1 : 0) }}
-
+ {{ hiddenInput('isPrimaryBilling', 0) }}
+
- {{ input('hidden', 'isPrimaryShipping', address.isPrimaryShipping ? 1 : 0) }}
-
+ {{ hiddenInput('isPrimaryShipping', 0) }}
+
{% endif %}
{% js %}
-{% if showPrimaryCheckboxes %}
-document.querySelectorAll('input[type=checkbox][data-primary-input]').forEach(el => {
- el.addEventListener('change', ev => {
- let primaryInput = document.querySelector(`input[name="${ev.target.dataset.primaryInput}"]`);
- if (ev.target.checked) {
- primaryInput.value = 1;
- } else {
- primaryInput.value = 0;
- }
- });
-});
-{% endif %}
-
document.querySelector('select#{{ 'countryCode'|namespaceInputId(addressName) }}').addEventListener('change', ev => {
const countryCode = ev.target.value;
const stateSelect = document.querySelector('select#{{ 'administrativeArea'|namespaceInputId(addressName) }}');