fieldHasValue function
Last updated: 2026-03-04T23:21:38.398Z
Location
Metrics
LOC: 10
Complexity: 6
Params: 1
Signature
fieldHasValue(field: FormField): : boolean
Source Code
function fieldHasValue(field: FormField): boolean {
const el = field.element;
if (el instanceof HTMLInputElement) {
if (el.type === "checkbox" || el.type === "radio") return el.checked;
return el.value.trim() !== "";
}
if (el instanceof HTMLTextAreaElement) return el.value.trim() !== "";
if (el instanceof HTMLSelectElement) return el.value !== "";
return false;
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| doFillAllFields | calls |
| fillContextualAI | calls |