Skip to content

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.

Example submission response with truncated text
{
"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.

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:

  1. Check the truncated_text for each submission
  2. Set up another template to generate any addendum pages when necessary
  3. 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.