Loan-Right Confirmation Block
tibi/form-confirm renders the loan-right verification form. It collects personal details and documentation files, then submits them to the NLB verification endpoint.
Summary
| Item | Value |
|---|---|
| Block name | tibi/form-confirm |
| Editor title | Skjema: Bekreftelse på lånerett |
| Category | text |
| Render root | #root |
| Frontend app | packages/wordpress/themes/tibi/src/confirm.tsx |
| Block source | packages/wordpress/plugins/tibi-block-library/src/form-confirm/ |
Editor Usage
Use this block for the loan-right confirmation page. Editors can change:
| Attribute | Purpose |
|---|---|
thankYouPageMessageNb |
Bokmal success message. |
thankYouPageMessageNn |
Nynorsk success message. |
The form fields are not editor-configurable. The frontend app owns validation, file handling, and the API request.
Submitted Data
The form submits:
- First name.
- Last name.
- Phone number.
- Email.
- National ID.
- One or more documentation files.
Files are sent as attachment, attachment2, attachment3, and so on.
API Flow
The endpoint is:
POST {apiBaseUrl}/v1/enrollments/verify
The API base is https://api.nlb.no in production and https://api.dev.nlb.no outside production. The form uses FormData because it supports file uploads.
Asset Loading
The theme enqueues the confirmation app only when the current page contains tibi/form-confirm.
Reference:
packages/wordpress/themes/tibi/inc/assets.php
QA Checklist
- Test on stage:
https://beta.tibi.no. - Submit without required fields and confirm the error summary appears.
- Upload a valid documentation file and confirm the request is sent as
FormData. - Confirm both Bokmal and Nynorsk success messages render.
- Confirm the API base points to the expected environment.
When To Ask A Developer
Ask a developer before changing required fields, file upload behavior, API field names, endpoint paths, or validation messages.