How automatic error detection and targeted removal of empty fields works in ChiliDocs documents.
🧩 What does the “Hide Empty Fields” feature do?
In ChiliDocs, you can use a checkbox in the editor to decide how empty placeholders should be handled. This feature helps you generate clean, professional documents by either removing unwanted empty fields or clearly highlighting missing data.
✅ Behavior when the “Hide Empty Fields” checkbox is enabled
When the checkbox is enabled:
- Placeholders for which no data is available from HubSpot – for example, when the corresponding field is empty or null – are automatically removed from the document.
- If such a placeholder appears on its own line, the entire line is removed from the document.
- This keeps the layout tidy and professional – with no gaps or awkward spacing caused by empty fields.
📝 Example:
A placeholder like [contact.city]
with no value will be removed. If it is in its own line, the whole line will disappear.
❌ Behavior when the “Hide Empty Fields” checkbox is disabled
When the checkbox is not enabled:
- Placeholders with no value will remain visible in the document.
- These placeholders are highlighted in red, making them easy to spot in the final output.
- This display is especially useful when testing templates, as it helps identify which fields are missing data from HubSpot.
📝 Example:
Instead of being removed, the placeholder appears as:[contact.city]
(highlighted in red)
⚠️ Invalid placeholders (SyntaxError)
Regardless of the checkbox setting, ChiliDocs automatically detects invalid placeholders, also known as syntax errors:
- A syntax error occurs when a placeholder cannot be matched with a valid HubSpot property.
- This typically happens when the placeholder (internal field name) is misspelled or references a property that doesn't exist in HubSpot.
- These placeholders are never removed. Instead, they are marked with the prefix
SyntaxError:
and are highlighted in red – both in regular text and in tables.
📝 Example:
A misspelled placeholder like [contact.citys]
will appear as:SyntaxError: Missing or undefined property [contact.citys]
(highlighted in red)
đź’ˇ Summary
With the “Hide Empty Fields” option and automatic syntax error detection, ChiliDocs gives you reliable control over placeholder content. The result is a clean, professional document – whether you choose to hide empty fields or keep them visible for debugging – always with clear visual feedback for identifying missing or invalid data.