A Form can collect an address that's not the mailing or permanent address of an individual. Examples include the address of an emergency contact, a birthplace, or the location of a previous employer. Slate offers two ways to store that address, and the method you choose determines how the data behaves afterward.
The options described in this article collect additional address types or store address components in custom fields. To collect a standard permanent or mailing address in the Slate-hosted application, use an embedded Address Widget-scoped form as described in Custom Personal Background Page.
🔑 Required permissions
Database: Create the address type prompt or the custom address fields.
Forms or Forms (edit all users): Create and edit the form.
Choose a method
Both methods place a single address widget on the form. They differ in where Slate stores the submitted address.
Use a custom address type when the address is a place you can reach the person. Slate saves the address to the Contact/Address table on the person or dataset record alongside the mailing and permanent addresses. The address is available from the Address query base and ranked in its own type. Setup is one prompt value.
Use custom address fields when any of the following is true:
The address describes something rather than locating someone, such as a birthplace.
The data needs field-level permissions.
The address belongs with a group of related custom fields, such as the name, relationship, and address of an emergency contact.
The data must be application-scoped.
Setup is five custom fields.
Collect the address as a custom address type
Add the address type prompt
📝 Note: these steps change if the
address_typeprompt key doesn't exist in your databaseIf your database doesn't already have a prompt key called
address_type, follow the instructions in Customizing Prompts for Standard Fields to add a new address type instead.
Go to Database → Prompts.
Select the
address_typeprompt key.Select New Prompt.
Configure the following settings:
Value: The name of the address type, such as Emergency Address.
Index Value: A unique value of 16 characters or fewer, such as
emergency.
Select Save.
💡 Tip
New prompt values become available on forms after the cache refreshes, about every five minutes. To use them right away, go to Database → Prompts and select the force-refresh link.
Add the address to the form
Go to Forms.
Create a new form or select an existing form.
Select Edit Form.
Drag a Section Break onto the form.
Under the section break, drag a Street Address block onto the form. Map it to Address → Address Block, enter a name, and select Save.
Add a Select List and map it to Address → Address Type. Set Default Value to the new address type, set the field to Hidden, enter a name, and select Save.
Drag a second Section Break onto the form, below the address fields.
The section breaks group the address block with its address type. Set the select list to Hidden so respondents can't change the type. If respondents should choose the type themselves, leave the field visible.
Test the form
Submit the form for a test record. Confirm that the address appears in the Contact/Address section of the person record with the expected type.
Collect the address in custom fields
Create the custom fields
Slate recognizes custom fields with IDs that end in _street, _city, _region, _postal, and _country. When the export key of an address widget matches the part of the ID before those endings, Slate routes each part of the submitted address to the matching field. You can't map the parts of an address widget to fields individually, so this naming is what sends each value to the right place. Choose one stem and use it for all five fields.
Go to Database → Fields.
Select New Field.
Create five fields using one stem for the Field ID, such as
emergency_address:emergency_address_streetemergency_address_cityemergency_address_regionemergency_address_postalemergency_address_country
Field IDs must not contain spaces or special characters other than an underscore.
Set the Scope to match the data you collect. Person-scoped fields store one address for each person record. Application-scoped fields store one address for each application.
Set the Field Type for each field:
Street, City, and Postal: Free Text
Region: Single Value, using the pre-built
statepromptCountry: Single Value, using the pre-built
countryprompt
📝 Note: the state prompt isn't limited to the United States
When you bind the field to an address widget, the list updates to the regions of the selected country.
💡 Tip
New fields become available on forms after the cache refreshes, about every five minutes. To use them right away, go to Database → Fields and select the force-refresh link.
Add the address to the form
Go to Forms.
Create a new form or select an existing form.
Select Edit Form.
Drag a Street Address widget onto the form from the form palette.
Leave the System Field list blank.
In the Export Key setting, enter
sys:field:followed by the stem. In this example, the export key issys:field:emergency_address. For application-scoped fields, usesys:app:emergency_address.Select Save.
Test the form
Submit the form for a test record. Confirm that each part of the address saved to the matching custom field.
Related articles
📖 See also: Customizing Prompts for Standard Fields
📖 See also: Prompts
📖 See also: Form Palette