# edit-address

> Form that edits the address of its row, prefilled by the address list.

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/elements/edit-address  
Updated: 2026-10-13

## Where it can go

- **Inside** [`customer-address`](https://www.smootify.io/docs/reference/elements/customer-address).
- **Must contain** `form`.
- **Out of place,** Smootify removes it from the page: no form or selects; outside a row nothing is prefilled. 2.0: without the country select it is a “Set as default” form (a hidden defaultAddress input with value=“true”, a submit): it needs no selects and sends only the default, the address stays as it is.

## What it requires

- Shopify’s **customer accounts**, and `newCustomerAccountsPublicKey` in [`SmootifyUserOptions`](https://www.smootify.io/docs/reference/options).

## Fields in the form

Each field’s **Name** setting in Webflow tells Smootify what the field holds. It is a setting of the field, not a custom attribute.

| Name | Field | What it does |
|---|---|---|
| `countryCode` | Select field | **Required** (removed without it). The country, made required (1.x and the first 2.0 builds: `territoryCode`, which Shopify deprecated; the debugger flags it); Smootify fills the options with the countries the shop ships to, keeping an option without a value as the placeholder. |
| `zoneCode` | Select field | **Required** (removed without it). The province or state; Smootify replaces every option with the zones of the chosen country, the select is required only when the country has zones, and the host has `no-zone` until it does. |
| `firstName`, `lastName`, `company`, `address1`, `address2`, `city`, `zip` | Text field | The address lines; in `edit-address` every field named like a key of the address is prefilled. |
| `phoneNumber` | Text field | The phone, sent without spaces. |
| `defaultAddress` | Checkbox | Checked: the address becomes the default; unchecked: the default stays. |
| any other name | — | Sent to Shopify, which refuses the address: leave it out. |
| `id` | hidden | The address updated. |

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Address form (condition)](https://www.smootify.io/docs/reference/conditions/address-form) | `address-condition` | 1 |

## Loading

Its code loads only on pages that have `edit-address`.
