Attachments and documents

Why is my document template PDF missing fields, badly formatted, or failing with a syntax error?

Use supported field types, set dates and time zones with the Format button, fix unclosed or Formula builder tags, and attach the PDF from the integration action.

Fix

Short answer: Most PDF problems come from unsupported field types, formatting set in the wrong place, or a broken template tag. Copy unsupported values into supported fields, set date and time zone with Format, and check the template for unclosed or Formula builder tags.

Why it happens

  • Only some field types work in a document template. Lookup, multi-select dropdown, checkbox, attachment, aggregation and rich text fields don't appear.
  • Number, currency, date and date-time values arrive already formatted as text, using the template's Format settings.
  • Action failed due to syntax error in document template means a tag the engine can't read. The message doesn't say which line.

How to fix it

If a field is missing from the field list:

  1. Add a supported field (Text, Number, Date and so on) to the form.
  2. Fill it from the unsupported field with a formula or an integration step. For a multi-select dropdown, use Field.concatenate(", ") in a Text field.
  3. Insert the new field in the template.

If dates show the wrong order or time zone:

  1. Open the template and click Format.
  2. Open Time zone, choose the time zone, then set the Order under Date format. See Formatting currency, number, and date fields.

If you get the syntax error:

  1. Check that every {% if %} has an {% endif %} and every {% for %} has an {% endfor %}.
  2. Replace ||, && and functions such as isBlank( with or, and and not.
  3. Clear formatting that covers only part of a tag.
  4. If you changed the lines around a form table, drop the table in again.

See Finding a syntax error for the full checklist.

To show or hide a section based on a value, use {% if %} tags. See Writing logic in your template.

To attach the PDF to the item:

  1. In an integration, add the Kissflow Process action Generate a PDF document (it shows as Generate PDF in the flow).
  2. Set Do you want to attach the document in the form? to Yes, then pick the field under Select the attachment field. See Associating a document template.

Important

Page setup covers orientation, page color and margins only. Output is PDF only. Formatting pasted from Word may not carry over, so retype it in the editor.

Related answers