Add a New Zealand suburb field to the user interface

Before you begin

Complete the step Edit supporting user interface files and add New Zealand suburb field before you perform this step.

Procedure

  1. Navigate in the Project window to configuration > config > Page Configuration > pcf > address and double-click GlobalAddressInputSet.default to open it in the editor.
  2. Click InputSet: GlobalAddressInputSet at the top of the screen to open its Properties pane at the bottom.
  3. 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)
    • namesuburbhandler
  4. In the screen, select the Address 3 Input widget.
  5. Drag an AddressAutofillInput widget from the Toolbox to the Address 3 Input widget and drop it so it appears after this widget. Select the new widget.
  6. In the Properties panel, set the following values:
    • editableaddressOwner.isEditable(fieldId.SUBURB)
    • idSuburb
    • requiredaddressOwner.isRequired(fieldId.SUBURB)
    • valueaddressOwner.AddressDelegate.Suburb
    • action
      if (addressOwner.AutofillIconEnabled)
        gw.api.contact.AddressAutocompleteUtil.autofillAddress(
               addressOwner.AddressDelegate, "Suburb")
    • actionavailableaddressOwner.AutofillIconEnabled
    • autoCompletesuburbhandler
    • autoCompleteArgIdsSuburb,City,County,State,PostalCode,Country
    • availableaddressOwner.isAvailable(fieldId.SUBURB)
    • visibleaddressOwner.isVisible(fieldId.SUBURB)
    • labeldisplaykey.Web.AddressBook.AddressInputSet.Suburb

      Do the following to create this display key.

      • If you see a red icon:
        1. Click the red icon and choose Create Display Key.
        2. Under en_US, enter Suburb and then click OK.
      • If no red icon appears:
        1. Navigate in the Project window to configuration > config > Localizations > Resource Bundle 'display' and double-click display.properties to open this file in the editor.
        2. Add the key Web.AddressBook.AddressInputSet.Suburb = Suburb to that file.

What to do next

The next step is Restart Studio and modify ContactManager.