Handle Truncated Text
If the full text can’t fit in a field and the field’s “Overflow” option is set to “Truncate”,
DocSpring will store any truncated text in the submission.
This will be returned as a truncated_text
object when you make a Get Submission API request.
Response Format
Section titled “Response Format”{ "submission": { // ... other submission data ... "truncated_text": { "title": ["text that could not fit in the field"] } // ... other submission data ... }}
Every key in the truncated_text
object is a field name, and each value is an array of strings.
Use Case: Addendum Pages
Section titled “Use Case: Addendum Pages”Some government and immigration forms have an optional addendum page that can be attached if any text is too long to fit in one of the fields.
You could:
- Check the
truncated_text
for each submission - Set up another template to generate any addendum pages when necessary
- Use the Combine PDFs API endpoint to merge the main PDF form and any addendum pages
This approach ensures all submitted information is captured, even when form fields have size limitations.