Add a New Zealand suburb field to the user interface
Before you begin
Procedure
-
Navigate in the Project window to and double-click
GlobalAddressInputSet.defaultto open it in the editor. -
Click
InputSet: GlobalAddressInputSetat the top of the screen to open itsPropertiespane at the bottom. -
Click the Variables tab,
and then click Add (plus sign) to add a new variable.
Enter the following values:
- initialValue –
contact.AddressAutocompleteHandler.createHandler( "Suburb","Suburb,City,County,State,PostalCode,Country",true) - name –
suburbhandler
- initialValue –
-
In the screen, select the Address 3
Inputwidget. -
Drag an
AddressAutofillInputwidget from the Toolbox to the Address 3Inputwidget and drop it so it appears after this widget. Select the new widget. -
In the Properties panel, set the following values:
- editable –
addressOwner.isEditable(fieldId.SUBURB) - id –
Suburb - required –
addressOwner.isRequired(fieldId.SUBURB) - value –
addressOwner.AddressDelegate.Suburb - action –
if (addressOwner.AutofillIconEnabled) gw.api.contact.AddressAutocompleteUtil.autofillAddress( addressOwner.AddressDelegate, "Suburb") - actionavailable –
addressOwner.AutofillIconEnabled - autoComplete –
suburbhandler - autoCompleteArgIds –
Suburb,City,County,State,PostalCode,Country - available –
addressOwner.isAvailable(fieldId.SUBURB) - visible –
addressOwner.isVisible(fieldId.SUBURB) - label –
displaykey.Web.AddressBook.AddressInputSet.SuburbDo the following to create this display key.
- If you see a red icon:
- Click the red icon and choose Create Display Key.
- Under
en_US, enter Suburb and then click OK.
- If no red icon appears:
- Navigate in the Project window to and double-click display.properties to open this file in the editor.
- Add the key
Web.AddressBook.AddressInputSet.Suburb = Suburbto that file.
- If you see a red icon:
- editable –
What to do next
The next step is Restart Studio and modify ContactManager.
