Address
Inherits from FieldStack
This view provides a field that allows the user to enter an address, or display an address to be updated. Because it has to account for international addresses very little validation is performed.

Properties

Property
Type
Description
Label
string
The title for this input field.
IsRequired
bool
If set to true then the user will need to enter a value.
SelectedAddress
MobileAddress
Contains the address as entered by the user. Valid child properties are: Street1, City, State, PostalCode, Country.
The Address field is one of the few fields that should not be displayed in a FieldContainer that is forced into grouped mode. It is itself a grouped view so if you try to embed it inside another grouped view then you end up with double padding and double borders.

Example

1
<Rock:FieldContainer>
2
<Rock:Address Label="Rock Address" IsRequired="false" />
3
</Rock:FieldContainer>
Copied!
If you need to provide a default address to be displayed when the view is rendered, you can do so as follows:
1
<Rock:FieldContainer>
2
<Rock:Address Title="Rock Address" IsRequired="false">
3
<Rock:Address.SelectedAddress>
4
<Common:MobileAddress Street1="1885 Lost Ln"
5
City="Knowhere"
6
State="CA"
7
PostalCode="92710"
8
Country="USA" />
9
</Rock:Address.SelectedAddress>
10
</Rock:Address>
11
</Rock:FieldContainer>
Copied!
Copy link