Components

customapplicationnumberinput

An input specialised for IremboHub application numbers — validates the format and can look up the referenced application to populate downstream fields.

An input specialised for IremboHub application numbers — validates the format and can look up the referenced application to populate downstream fields.

Read Form Rules before using this component — keys, labels, required fields, expressions, visibility, and validation all follow shared conventions.

When to use

  • A user must reference an existing IremboHub application (e.g. an extension, amendment, or renewal that links back to a prior submission)
  • The form should pre-fill data from the prior application via populates

When NOT to use

Instead of customapplicationnumberinput, use…For…
customidinputIdentity document lookup (NID, passport, refugee ID)
customcrvsidinputCRVS document lookup (birth/death/marriage certificate)
inputA free-text reference number with no IremboHub lookup

Props

The full prop surface mirrors customidinput (label, required, defaultRequired, url, endpointCode, useBaseUrl, populates, hideField). Verify exact prop names against the running UI library before shipping.

PropTypeRequired?Description
labelstringrequiredVisible label.
requiredbooleanrequiredAlways false. The expression controls the runtime value.
defaultRequiredbooleanrequiredtrue for required fields, false for optional ones.
endpointCodestringoptionalIntegration endpoint code for the application lookup, if a lookup is required.
urlstringoptionalIntegration endpoint path — typically /integration/v1/fetch/sync.
useBaseUrlbooleanoptionalPrepend the API gateway base URL to url. Set true for production.
populatesarrayoptional{ valueKey, targetKey } mappings to auto-fill downstream fields from the response.
hideFieldbooleanoptionalHides the field and excludes its value from submission. Toggle via expressions["props.hideField"].

Examples

Minimal — application number reference

{
  "key": "PREVIOUS_APPLICATION",
  "type": "customapplicationnumberinput",
  "props": {
    "label": "Previous Application Number",
    "required": false,
    "defaultRequired": true
  },
  "expressions": {
    "props.required": "!(field?.props?.hideField || field?.hide) && field?.props?.defaultRequired"
  },
  "validation": {
    "messages": {
      "required": "Application number is required.",
      "invalidAppNo": "Enter a valid application number."
    }
  }
}

Full example — lookup with populates

{
  "key": "PREVIOUS_APPLICATION",
  "type": "customapplicationnumberinput",
  "props": {
    "label": "Previous Application Number",
    "required": false,
    "defaultRequired": true,
    "url": "/integration/v1/fetch/sync",
    "useBaseUrl": true,
    "endpointCode": "GETAPPLICATIONBYNUMBER",
    "populates": [
      { "valueKey": "applicantFirstName", "targetKey": "FIRST_NAME" },
      { "valueKey": "applicantLastName", "targetKey": "LAST_NAME" },
      { "valueKey": "applicationDate", "targetKey": "PREVIOUS_APP_DATE" }
    ]
  },
  "expressions": {
    "props.required": "!(field?.props?.hideField || field?.hide) && field?.props?.defaultRequired"
  },
  "validation": {
    "messages": {
      "required": "Application number is required.",
      "invalidAppNo": "Enter a valid application number."
    }
  }
}

Validation messages

The widget emits invalidAppNo when the entered number fails the format or lookup check. See Cross-field Validators for the full identity-validator list.

Common mistakes

  • Setting required: true directly — use the required: false + defaultRequired: true + expression pattern from Form Rules.
  • Forgetting useBaseUrl: true in production when a lookup is configured — the request is sent to a relative path with no host and fails.
  • Using customapplicationnumberinput for a free-text reference that needs no lookup — use plain input and add a pattern if you want format validation.
  • Omitting validation.messages.invalidAppNo — when the format check fails the user sees no error text.

Checklist

  • key is UPPER_SNAKE_CASE and unique across the entire form
  • props.label is present, unique, and correctly cased
  • Field is nested at the correct depth: sections > formly-group > block > customapplicationnumberinput
  • required: false is set (never true)
  • defaultRequired is set (true or false)
  • expressions["props.required"] is present with the exact required expression
  • If a lookup is required, endpointCode, url, and useBaseUrl are all configured
  • If populates is used, every targetKey corresponds to a declared field
  • validation.messages.required and validation.messages.invalidAppNo are present

On this page