Form
Form router component (currently only supports location type). Delegates to specific form implementations based on type.Import
Props
Form type to render
Whether Google Maps API is loaded (required for location form)
Visual design variant for input fields
Custom placeholder text for the address input
Default/initial location data
Callback fired when form data changes or validation occurs
Custom styles for the form container
LocationProps
Street name
Street number
Additional address info (apartment, suite, etc.)
City name
Province/state
Postal/ZIP code
Country name
Full formatted address string
Usage
Notes
- Requires Google Maps API: Must load Google Maps JavaScript API with Places library before use
- Location form includes Google Places autocomplete
- Validates that street number is provided
- Shows error message if street number is missing
- Auto-populates city, province, and postal code from Google Places
- Additional fields (apartment, etc.) shown after address is selected
- City, province, and postal code fields are read-only (populated by autocomplete)
- Form calls
onSubmitwith eitherdata(valid location) orerror(validation message)