The CHILD ID widget is a specialized input field for capturing and validating identification numbers, such as child IDs, national IDs, or similar identity documents.
This widget integrates with backend identity services to validate and retrieve details based on the entered ID. It supports enforcing specific ID formats (like length and type), displaying validation messages, and auto-populating related fields in the form with information returned from the backend. It is commonly used in identity verification workflows and can be configured to work within a single block or across the entire form structure.
Complete JSON Object
{
"key": "InputKey",
"type": "customidinput",
"props": {
"label": "Input Name",
"required": true,
"idType": "CHILD_ID",
"endpointCode": "NIDAGETCHILDINFO",
"useBaseUrl": true,
"placeholder": "Input Placeholder",
"populateRelativeToRootForm": false,
"idLength": 8,
"populates": [
{
"valueKey": "foreName",
"targetKey": "wifeOtherName"
}
]
},
"validation": {
"messages": {
"required": "Error message for `required`",
"invalidInput": "Error message for invalid input",
"invalidId": "Error message for invalid ID"
}
}
}
{
"key": "InputKey",
"type": "customidinput",
"props": {
"label": "Input Name",
"required": true,
"url": "/identity/v1/child-id-info-by-username",
"endpointCode": "NIDAGETCHILDINFO",
"useBaseUrl": true,
"placeholder": "Input Placeholder",
"populateRelativeToRootForm": false,
"idLength": 8,
"populates": [
{
"valueKey": "foreName",
"targetKey": "wifeOtherName"
}
]
},
"validation": {
"messages": {
"required": "Error message for `required`",
"invalidInput": "Error message for invalid input",
"invalidId": "Error message for invalid ID"
}
}
}
Allowed Custom Properties
Allowed Validations
When populateRelativeToRootForm is false or undefined, the input tries to populate fields only within the same block. In this case the poplates array items need to just speify the value and target where by the target`` is the target field’s key. When ``populateRelativeToRootForm`` is true, the input tries to populate any field (in any section or block) relative to the root form of the formly form. In this case the target values in thepoplatesarray items need to be the key path from the root from n the form of:.{ BlockKey }.{ TargetFieldKey }` .
This must be the same for all target keys. e.g.
{
valueKey: 'forename',
targetKey: 'Applicantdetailsj9zdW.block7KUKUYY.father',
relativeToRoot: true,
}