Delete Address Form - Liquid Form Reference
On this page
Usage
```liquid
{% for address in current_customer.addresses %} {% form “delete-address”, address: address, data-success: “sc.address-book.changed”, data-type: “json”, remote: true %} {% endform %} {% endfor %} ```
The delete-address form removes one entry from the signed-in customer’s address book. It is typically rendered as a “Delete” button beside each saved address.
| Property | Value |
|---|---|
| Form Name | delete-address |
| Category | Accounts |
Parameters
| Parameter | Required | Description |
|---|---|---|
address |
Yes | The CustomerAddress entry to remove |
Any other tag option is passed through as an HTML attribute on the <form> element.
Pair it with remote: true and a data-success event so a reloadable {% component %} can refresh the list in place rather than navigating the whole page.
What happens to a default
When the deleted entry was the default shipping or billing address, the customer’s oldest remaining entry becomes the new default. When no entries remain, preferred_shipping_address and preferred_billing_address return the account’s own address.
Form Object
Inside the form block, you can access the form object which provides:
form.errors— Any validation errors after submission
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.