Handle missing and conflicting source values at form submission
Prepared with AI assistance by Alactic Editorial. Examples identified as hypothetical are illustrative, not customer results.
A lead arrives with an empty hidden source field. Another carries a campaign value from an earlier visit. A third says “Referral” in the visible form while a hidden field says “Paid search.” If staff must choose a source before saving each lead, guesses become indistinguishable from captured evidence.
The fix is to define acceptance rules at submission: accept only source values that meet a documented format, vocabulary, and freshness rule; preserve relevant evidence separately; and record missing evidence as unknown, not as a conflict. Use conflict only when accepted evidence disagrees about the same defined source question.
This is a capture-provenance workflow, not a method for assigning credit across channels. Its purpose is narrower: make the record explain what was received, what was accepted, and why a source was or was not resolved.
1. Define what the source field is supposed to mean
A field called “Source” is too ambiguous to govern reliably. It might mean how someone first discovered the business, what brought them to this form, or what campaign context accompanied the submission. Those are different questions.
Before choosing a fallback, write one sentence defining the resolved field. For example, a hypothetical team could use: Submission source is the accepted channel evidence associated with this form submission. It could then store the answer to “How did you first hear about us?” in a separate discovery-source field.
Under that definition, a current paid-search tag and a self-reported recommendation can both be valid. They describe different events. Treating them as a conflict would destroy useful information.
If the visible question instead asks “What brought you to this form today?”, its answer may address the same event as the hidden tag. A disagreement then deserves a conflict state rather than an automatic winner.
- Define the event: discovery, arrival at the form, or another explicitly named event.
- Define the vocabulary: the channel values the resolved field can contain.
- Define eligible evidence: which submitted values may support that field.
- Define precedence: whether one evidence type has a justified priority, or disagreement remains unresolved.
Do not adopt “hidden beats visible” as a general rule. A hidden field is a transport mechanism, not proof of accuracy.
2. Separate the resolved result from its evidence
One editable source dropdown cannot adequately represent a raw value, its validation result, and the final decision. Use distinct fields or an associated evidence record in the system that receives submissions.
The recommended record has three layers:
- Relevant submitted evidence: the incoming source value, the visible answer when present, the evidence origin, and any available context used to judge freshness.
- Evidence assessment: whether each candidate is absent, malformed, outside the allowed vocabulary, stale, or accepted.
- Resolution: the resolved source, resolution status, reason code, decision time, and rule version.
Keep the resolved source empty when no channel can be justified. Put unknown or conflict in a separate status field rather than mixing those states into the channel vocabulary.
A practical status set is resolved, unknown, and conflict. Reasons provide the detail: no_evidence, unexpected_value, stale_context, or accepted_candidates_disagree. This lets a report distinguish missing data from rejected data without inventing channels such as “Unknown campaign.”
Preserve only evidence needed to explain the decision. Do not store an entire browsing history or full URL merely because one source parameter matters. Set access and retention rules for the evidence record, and avoid copying unrelated personal information into diagnostic notes.
3. Apply acceptance checks before choosing a source
Run every candidate through the same ordered checks. Resolution should compare accepted candidates, not raw strings that happen to be present.
- Presence: distinguish an omitted field, an empty value, and a value containing only whitespace. They can share an unknown outcome while retaining different diagnostic reasons.
- Shape: check the expected data type, length, and structure. A source expected to be a short text token should not accept an arbitrary object or oversized payload.
- Normalization: apply documented transformations, such as trimming surrounding spaces. Preserve the received value separately when needed to explain the transformation.
- Vocabulary: match the normalized value against approved values or an explicit alias map. Do not turn every unfamiliar string into “Other.”
- Freshness and origin: verify the context required by the chosen policy. A populated value is not necessarily current.
- Semantic comparison: compare accepted values only when they describe the same source question.
Normalization must not become speculation. A documented alias from paid-search to paid_search is different from deciding that an unfamiliar abbreviation probably means a known campaign.
Apply decisive validation in the receiving system. W3C guidance on form validation explains that client-side checks do not replace server-side validation and that errors should be understandable and accessible.
Usually, a missing optional source value should not prevent an otherwise valid enquiry from being accepted. Record the uncertainty instead. If a visible answer is required, show an understandable error beside that question; do not ask the visitor to repair a hidden tracking field they cannot inspect.
4. Use a filled source-resolution table
Fictional worked example: the following table describes a hypothetical team's proposed rules, not an existing product capability or customer result. Its resolved field means “channel associated with this submission.” Allowed values are paid_search, email, referral, and other. The visible question asks “What brought you to this form today?” and includes an optional “Not sure” answer.
In this hypothetical policy, context explicitly retained from an earlier session is ineligible. Context whose freshness cannot be established is also excluded. A visible answer can resolve the field when the hidden candidate is absent or rejected. If both candidates pass acceptance checks but disagree, neither wins automatically.
The compact table uses H for hidden evidence and V for the visible answer. A dash in the result means the resolved channel remains empty. Every row is hypothetical.
Case | Evidence received | Recorded result | Reason A | H absent; V unanswered | — / unknown | no_evidence B | H whitespace; V Not sure | — / unknown | no_usable_evidence C | H partner_x; V unanswered | — / unknown | unexpected_value D | H object instead of text; V unanswered | — / unknown | malformed_value E | H email from earlier session; V unanswered| — / unknown | stale_context F | H email from earlier session; V referral | referral / resolved | visible_only_accepted G | H current paid_search; V referral | — / conflict | accepted_candidates_disagree H | H current paid_search; V paid_search | paid_search / resolved | accepted_candidates_agree I | H absent; V referral | referral / resolved | visible_only_accepted J | H current ' paid-search '; V unanswered | paid_search / resolved | approved_alias
In case C, retain partner_x as the relevant raw evidence and mark it unrecognized. Do not silently map it to referral because the name sounds like a partner campaign. The value might represent a legitimate new source, a configuration error, or an unrelated string.
In case F, retain the rejected email evidence and its stale assessment even though referral resolves the field. Otherwise, the recurring stale-value problem disappears from view.
In case G, keep both accepted candidates. Conflict means there is usable disagreement, not that either answer has been proven false. A hidden value can satisfy capture rules without proving why the person arrived.
In case J, the alias must already exist in the rule set. If staff invent the mapping while reviewing that one lead, the decision is no longer a repeatable capture-time rule.
5. Make freshness an explicit rule, not a feeling
Stale values are particularly easy to miss because they often look perfectly valid. The text matches the vocabulary, but its connection to the current submission is weak or broken.
Choose a freshness policy that your available evidence can support. It might require context associated with the current form visit, or another documented capture boundary. If you use an elapsed-time limit, document why that limit fits the form journey and test its failure cases. There is no universal duration that makes every source value reliable.
Do not manufacture a capture time by treating the submission timestamp as the time the hidden value originated. Those timestamps answer different questions.
- Known earlier context: reject it if the policy requires current context.
- Missing origin time or context: record freshness as unverified rather than declaring the value current.
- Long-running form completion: decide whether the original form context remains eligible; do not let a timeout silently choose the answer.
- Changed values during completion: preserve the relevant submitted evidence and apply a documented rule for which context is eligible.
A stricter freshness rule will produce more unknowns. A looser rule will accept more values with weaker provenance. Make that trade-off visible instead of optimizing solely for a low blank-field count.
6. Keep the visible question answerable
A self-report is useful only if the person understands the event being asked about. “How did you hear about us?” should not be used as a substitute for “What brought you here today?” without acknowledging the change in meaning.
Give the question a clear label and associate it programmatically with its control. That follows W3C guidance on labeling form controls. Include a genuine uncertainty option when appropriate, rather than forcing a channel selection that the visitor cannot support.
Keep these answers distinct:
- Not sure: the visitor cannot identify a source.
- Other: the visitor identifies a source outside the listed choices.
- Unanswered: no visible response was provided.
If “Other” includes free text, retain the response separately from the normalized channel. Do not automatically translate every description into a known channel. An editor or operations owner may later approve a reusable mapping, but that should be a documented change.
7. Recover from errors without rewriting the evidence
Give staff a review path that does not require overwriting the original submission. A correction should record the previous result, the new result, who made the decision, and the evidence or rule change that justified it.
For an unexpected value, the owner can investigate whether a form configuration needs correction or the accepted vocabulary needs an addition. If a mapping is approved, identify which earlier records are eligible for reprocessing. Preserve their original decisions and mark the new resolution with the new rule version.
For a conflict, clarification may help when it matters to the enquiry, but contacting every lead merely to clean a reporting field can create unnecessary work. Leave unresolved cases as conflicts unless additional evidence justifies a change. Do not let sales staff choose whichever source makes their report look complete.
Also distinguish a decision failure from an evidence problem. If processing fails, record a pending or failed processing state outside the source-resolution status. Do not label the submission unknown until the evidence has actually been assessed.
A source value is not evidence of permission to contact someone through a particular channel. Keep contact permissions and source provenance separate.
8. Test the rules against the next batch of submissions
Before rollout, turn each row in the hypothetical table into a test case. Check the stored evidence, candidate assessments, final channel, status, and reason—not just what appears in the lead list.
Then review a defined batch of real submissions after the rules are introduced. Measure:
- Unknown share: submissions with no accepted source, split by reason.
- Conflict share: submissions with accepted disagreement about the same question.
- Rejected-candidate share: submissions containing stale, malformed, or unexpected evidence, including those resolved from another candidate.
- Manual correction share: decisions later changed, grouped by the original reason.
Keep rejected-candidate reporting separate from final status. Otherwise, a visible answer that rescues a broken hidden field can make capture defects appear to have disappeared.
For a hypothetical first review, inspect the next 50 submissions and require every unknown or conflict to have a reason code. The immediate success criterion is not fewer blanks: it is that another reviewer can reproduce the decision from the preserved evidence and the recorded rule version, without guessing.
Put the next conversation to work.
Explore Alactic Communications for WhatsApp conversations, campaigns and AI-assisted workflows. Choose the product and plan that fit your team.
Explore Communications