# Address

Collects structured address data with configurable fields for address lines, city, state, postal code, and country. Supports an optional map view.

## Schema

| Field | Type | Description |
|  --- | --- | --- |
| `questionType` | `"address"` | Identifies this as an address field |
| `media` | object | Optional image attached to the question |
| `address.labels` | object | Custom labels for each address part |
| `address.isShowAddressLine2` | boolean | Show the second address line |
| `address.isShowCity` | boolean | Show the city input |
| `address.isShowState` | boolean | Show the state input |
| `address.isShowPcode` | boolean | Show the postal code input |
| `address.isShowCountry` | boolean | Show the country selector |
| `address.isShowMap` | boolean | Show a map alongside the address fields |
| `address.showMapOnly` | boolean | Show only the map without text inputs |
| `address.defaultCountry` | string[] | Pre-selected country codes |
| `address.defaultValue` | object | Default values for address fields |


```json
{
  "_id": "6a0ef5da3affac35058b05a7",
  "questionType": "address",
  "question": "Address",
  "displayOrder": 2,
  "isRequired": false,
  "isDeleted": false,
  "isActive": false,
  "media": {
    "imageUrl": "https://images.unsplash.com/photo-1778546978501-58b8908583ef?...",
    "size": 100,
    "altText": "Cowboy hat on wooden fence with monument valley in background.",
    "align": "center",
    "brightness": 100,
    "_id": "6a0ef771a7a40272efec2aa3"
  },
  "address": {
    "labels": {
      "addressLine1": "Address",
      "addressLine2": "Address line 2",
      "city": "City",
      "state": "State address",
      "pcode": "Postal code",
      "country": "Country"
    },
    "isShowAddressLine2": true,
    "isShowCity": true,
    "isShowState": true,
    "isShowPcode": true,
    "isShowCountry": true,
    "isShowMap": false,
    "showMapOnly": false,
    "defaultCountry": [""],
    "defaultValue": {
      "addressLine1": "",
      "addressLine2": "",
      "city": "",
      "state": "",
      "pcode": ""
    }
  }
}
```