Address custom field
The address field enables users to select an address for the dynamic content item.
PREREQUISITES: The Address custom field is available only when you create dynamic content types. For more information, see Dynamic modules.
PREREQUISITES: If you want to use Geolocation API, you must use Microsoft SQL Server or SQL Server Express. Sitefinity CMS does not support geolocation when used together with Oracle and MySQL.
If you are using a database system that does not support Geolocation API, disable Geolocations in the following way:
- In the Sitefinity CMS backend, navigate to Administration » Settings » Advanced.
- In the treeview on the left, click GeoLocations » Providers » Default.
- Deselect the Enabled checkbox and save your changes.
Create an address custom field
To add an address field, perform the following:
- Perform procedure Create custom fields » Step 1 to Step 5.
- Enter the name of the address field.
The name of the field is different from its label. The field's name serves as a reference for that field in the backend.
- In the Type dropdown box, select Address.
- If you select This is a hidden field checkbox, the custom field is not visible on the website or in the backend, and you can only use it in the code.
IMPORTANT: Once you create a hidden field, you cannot edit its properties. Make sure you have configured all its properties before finishing creating it.
- In the Interface widget for entering data dropdown box, you select the widget that the content item editor will use to complete the field.
The default widget is Address and map. You can configure how it behaves in step 9 below.
- Expand the Advanced section if you want to change the SQL database type of the custom field or the name of the column of the database table where the custom field is added.
If you select the Allow empty values checkbox, the field is not required and can be left empty. If you deselect it, the field becomes mandatory.
- Click Continue.
The Address Window opens.
- In the Label input field, enter the label of the textbox.
For example, enter Home address.
- Select the method for entering the address by choosing one of the following:
|Address form only
||When creating a dynamic item, you can enter the Country, the City, the Zip, and the Street.
||When creating a dynamic item, you can pinpoint the address on the world map.
|Address form and map
||When creating a dynamic item, you can enter the Country, the City, the Zip, and the Street and also pinpoint the address on the world map.
- NOTE: To use a map for entering the address, you must set up Google Maps.
For more information, see Set up Google maps.
- If you want to make the textbox mandatory, select This is a required field.
- Click Done.
The new field appears in the Custom fields section.
If you want to delete a custom field, click .
- Click Finish.