Skip to content
Faith Forge LabsKosovo / websites & toolsWrite to us ↗

Keep every language choice from the form to the staff record

A form can accept a request successfully while losing part of what the person selected. When a field allows several values, every stage needs to understand that it is a collection. A receiving system that reads only one value can turn a valid request into an incomplete instruction.

This fictional example concerns a publication enquiry, with no payment involved. It illustrates a data-contract question to settle before adding more fields, local formatting rules or external services to a website.

Define the permitted request

The fictional library offers three reviewed publication resources. Its enquiry form allows a reader to request one or more language editions. The approved choices are English, Albanian and Serbian Latin, represented by the values en, sq and sr-Latn.

Request Q-46 is for publication R-46. The reader selects Albanian and Serbian Latin. The organisation's rule is to retain the unique selected languages for that one request; repeating the same value should not create a second request or a second instruction.

The form's purpose is an enquiry about available material. It does not establish a translation order, promise delivery of an unavailable edition or infer the reader's identity from the selected languages.

Follow the values across the boundary

In the controlled test, the browser submits these relevant entries:

Field Value
publication R-46
language sq
language sr-Latn

The raw request therefore contains both intentional selections. The receiving application, however, uses a single-value lookup for language. It saves sq into one text field and displays only “Albanian” to staff.

The problem is not that the second checkbox failed or that the reader changed their mind. The information is present at receipt and disappears during extraction into the staff record. Asking the reader to submit again would reproduce the same loss and might create an unnecessary second enquiry.

The FormData specification distinguishes retrieving one named value from retrieving all values for that name. Its getAll operation returns the matching values as a list. The precise receiver may use another framework or API, but it still needs an equivalent multi-value contract throughout the path.

Make the correction at the supported boundary

For this example, inspection confirms that the application and its storage support a list of language values. The correction reads the complete list, validates each value against the three approved choices and retains a unique set for the request. The staff view renders the corresponding reviewed labels.

Q-46 now stores sq and sr-Latn under the same request identity. Staff see “Albanian; Serbian Latin” alongside R-46. The change does not split the enquiry into two records or automatically create an order for translations.

The application must not collapse the list again when forwarding it to another system. If a destination only supports one language, that limitation needs an explicit design decision. Silently taking the first value is not an adequate compatibility strategy.

Decide what invalid or repeated values mean

The correction includes a small set of bounded checks:

Submitted selection Expected result in this example
sq, sr-Latn One request with both unique languages
en One request containing English only
sq, sq One request containing Albanian once
sq, unknown Validation response; no silently accepted partial request
No language value Required-choice feedback; no completed request

The unknown-value rule is important. Accepting only the recognised part could make the person believe that the whole selection was received. The response should explain the supported choices and preserve the other entered details so the person can correct the request deliberately.

Those are the fictional organisation's selected rules, not universal requirements for every form. An optional-language form would need different empty-value behaviour. The point is to define the result rather than inherit it accidentally from a library function.

Inspect the staff outcome and the user's feedback

The controlled test checks the stored record and the ordinary staff view. Both show the two languages under Q-46. A separate English-only request Q-47 still contains one language. The duplicate-value test does not produce duplicate records or duplicated staff instructions.

The reader's confirmation says that the enquiry was received. It does not claim that requested material has been sent or that a new edition will be prepared. If receipt cannot be confirmed, the interface should describe that uncertainty and provide a practical contact route rather than state that nothing happened.

Historical requests that already lost a value cannot be repaired by guessing. If their original permitted request evidence is unavailable, staff must treat the missing selection as unresolved and clarify it where necessary. Correcting the extraction prevents the demonstrated future loss; it does not recreate evidence the system never retained.

Keep formatting and payment decisions separate

Names, language values, publication references and amounts have different data requirements. A label translated for display should not change a stable publication reference. A future payment connection would need its own provider, currency, receipt and reconciliation decisions; the presence of a working enquiry form does not establish those capabilities.

Prepare the permitted choices, the expected stored representation and the receiving team's task before implementation. The content-connection service can investigate the relevant boundary, while payment dependencies explains what to establish if a separate transaction is actually required.