Faith Forge LabsIraq

Preserve whether the customer chose to save or send the request

Two buttons can share the same form while making different promises. “Save draft” keeps work for later. “Send for assessment” asks another person to review it. If an application loses which button the customer used, a successful save can look like a completed handover even though no assessment request exists.

This fictional example concerns an equipment quotation workflow. It stops before payment because the supplier must assess the requested configuration and destination first. The investigation concerns the action sent by the form, not a failure by a payment provider.

Inspect the action and the receiving record

Customer C-8 has an editable draft Q-26. The form contains two named submit controls: intent=save_draft and intent=request_assessment. The customer selects “Send for assessment”. All required information is present and the browser's submit event identifies that second control.

The JavaScript handler constructs new FormData(form) without the submitter. The captured request contains the draft reference and fields but no intent. Under the application's existing contract, an absent intent takes the draft-save branch. The server returns Q-26 with state draft.

The page nevertheless shows its hardcoded “Sent for assessment” message. In the staff queue there is no assessment item. This is not evidence that a message disappeared after being accepted: the receiving application saved a draft, exactly as the submitted request instructed under its default rule.

Keep the requested action explicit

The browser provides the invoked control through SubmitEvent.submitter. The documented FormData constructor can include a named submitter's data when that control is supplied. The actual supported browsers and submission paths still need to be examined for the project.

In this example, the corrected handler checks that the submitter belongs to the form and is an allowed action, then includes its name and value. A buttonless or unrecognised submission is not silently promoted to an assessment request. It follows the explicitly agreed draft policy or receives a request to choose an action, according to the supported path.

The organisation chooses “Save draft” as the first/default submit control. In the tested single-line-field Enter path, implicit submission therefore saves rather than requests assessment. This is a deliberate form design and verified behaviour, not a claim that Enter always means draft in every form or browser. The interface explains both actions clearly.

Let the server decide whether the transition is permitted

A submitted intent describes what the user asked for; it is not authority. The receiving system checks the authenticated customer, ownership of Q-26, its current state and the information required for assessment. It accepts only the named transitions allowed from that state.

A crafted intent cannot turn another customer's draft into an authorised request or create a payment. An unknown action is rejected. A request already under assessment is not treated as a new draft that may be silently resubmitted through this endpoint.

The response states the resulting record and state. The customer message is derived from that accepted result. A saved draft receives a draft acknowledgement; an accepted assessment request receives the reference and explanation appropriate to that handover.

Follow the repaired path to its actual conclusion

With controlled data, C-8 selects “Send for assessment” on Q-26. The request now includes intent=request_assessment. After the required checks, the server changes Q-26 to awaiting_assessment and creates queue item A-26 linked to the same draft. The customer sees that Q-26 was submitted for assessment. The staff reviewer opens A-26 and finds the configuration and destination supplied in the request.

A separate draft Q-27 is saved using “Save draft”. It remains a draft and creates no assessment item. The agreed Enter path on Q-28 has the same result. A request missing required assessment information stays out of the queue with an explanation; it is not presented as accepted merely because some values could be saved.

The unknown-intent and already-submitted controls are refused without a second queue item. The original failed attempt and its draft result remain in the investigation record rather than being rewritten as a successful submission.

Keep the next commercial decision separate

Assessment may lead to clarification or an approved offer. It does not establish payment, stock allocation or a binding acceptance that the business has not defined. Provider eligibility, currencies, commercial terms and payment handling remain separate requirements if ordering is added later.

Online-ordering development should begin with these actual promises and receiving states. Use the project brief to identify each action and its expected result. A truthful confirmation is part of the task, not decoration added after the form can save data.