mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
## Description Adds the ability to prefill native PDF form fields via the API using either normal documents or templates. Since we won't always know when a document is uploaded and has forms we opt to do this on creation for templates and on sending the document to recipients in all cases. This means that for a created document it can look a little funky since the form fields are missing the data until the document is sent. This should be improved in a later change but since we've scoped this to an API only workflow for now we are less concerned with the visual issues. ## Related Issue N/A ## Changes Made - Added the `formValues` field the document model - Added a new method for finding and filling form fields based on a `key | value` pair - Updated the API input shapes to take the new field. ## Testing Performed - Have created and tested a document using the API both for creation and usage with a template. - Have verified that the fields display as expected either during creation or sending depending on the document type.