FormsApi.getValues()
Every field's value by fully qualified name: a text field's text, a check box's or radio group's export value when one is on and
'Off' when none is, a choice field's option (a multi-select list box's choices as an array). Signature fields are left out. With a viewer open, what the viewer holds, typed values included. What it returns can be given back to setValues(); only read-only fields are refused. Needs the extract feature.methodReadingsince 1.0.0
Signature
getValues(): Promise<Record<string, FormValue>>
Returns
Promise<Record<string, FormValue>> By fully qualified name; a FormValue is a string, or an array of strings for a multi-select list box.
Throws
FEATURE_NOT_LICENSED— the license lacksextract.DOCUMENT_CLOSED— the document has been closed.
Example
TypeScript
const values = await doc.forms.getValues(); await fetch('/submit', { method: 'POST', body: JSON.stringify(values) });