Skip to content

The Open Source DocuSign Alternative.

fix: store formValues in database when creating document from template (#2437)

Lucas Smith594a0f0c3f14
diff --git a/packages/lib/server-only/template/create-document-from-template.ts b/packages/lib/server-only/template/create-document-from-template.ts
index 230b0a0e3..bb9ba9db2 100644
--- a/packages/lib/server-only/template/create-document-from-template.ts
+++ b/packages/lib/server-only/template/create-document-from-template.ts
@@ -551,6 +551,7 @@ export const createDocumentFromTemplate = async ({
visibility: template.visibility || settings.documentVisibility,
useLegacyFieldInsertion: template.useLegacyFieldInsertion ?? false,
documentMetaId: documentMeta.id,
+ formValues: formValues ?? undefined,
recipients: {
createMany: {
data: allFinalRecipients.map((recipient) => {