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… |
|---|---|
customidinput | Identity document lookup (NID, passport, refugee ID) |
customcrvsidinput | CRVS document lookup (birth/death/marriage certificate) |
input | A 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.
| Prop | Type | Required? | Description |
|---|---|---|---|
label | string | required | Visible label. |
required | boolean | required | Always false. The expression controls the runtime value. |
defaultRequired | boolean | required | true for required fields, false for optional ones. |
endpointCode | string | optional | Integration endpoint code for the application lookup, if a lookup is required. |
url | string | optional | Integration endpoint path — typically /integration/v1/fetch/sync. |
useBaseUrl | boolean | optional | Prepend the API gateway base URL to url. Set true for production. |
populates | array | optional | { valueKey, targetKey } mappings to auto-fill downstream fields from the response. |
hideField | boolean | optional | Hides 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: truedirectly — use therequired: false+defaultRequired: true+ expression pattern from Form Rules. - Forgetting
useBaseUrl: truein production when a lookup is configured — the request is sent to a relative path with no host and fails. - Using
customapplicationnumberinputfor a free-text reference that needs no lookup — use plaininputand add apatternif you want format validation. - Omitting
validation.messages.invalidAppNo— when the format check fails the user sees no error text.
Checklist
-
keyisUPPER_SNAKE_CASEand unique across the entire form -
props.labelis present, unique, and correctly cased - Field is nested at the correct depth:
sections > formly-group > block > customapplicationnumberinput -
required: falseis set (nevertrue) -
defaultRequiredis set (trueorfalse) -
expressions["props.required"]is present with the exact required expression - If a lookup is required,
endpointCode,url, anduseBaseUrlare all configured - If
populatesis used, everytargetKeycorresponds to a declared field -
validation.messages.requiredandvalidation.messages.invalidAppNoare present
checkbox
A single boolean toggle. Use for consent declarations, confirmations, and opt-ins where the user must actively check a box to proceed.
customcascadingdropdowns
A multi-level cascading dropdown for hierarchical selection. Each level filters the options available in the next level based on the parent selection.