SetFormsData
function SetFormsData(arrData: FormData[] = null): void
Description
Sets the data to the specified forms.
Parameters
An array of form data to set to the specified forms.
Returns
void
Try It
var oDocument = Api.GetDocument();
var oParagraph1 = oDocument.GetElement(0);
var oCheckBox = Api.CreateCheckBoxForm({key: "BestCompany"});
oParagraph1.Push(oCheckBox);
var oTextForm = Api.CreateTextForm({key: "CompanyName"});
oParagraph1.Push(oTextForm);
oDocument.SetFormsData([
{key: "BestCompany", value: true},
{key: "CompanyName", value: "OnlyOffice"}
]);