We’re passing form fields from a Tally form to a Google Doc template.
Some fields are optional in the Tally form
The Google Doc template obviously contains ALL placeholder variables
yet, when fields are left empty, the {{field-with-no-content}} just shows as its placeholder variable in the generated Google Doc.
How can we suppress placeholders in the generated file of form fields that have been left empty?
And would we do that in the Google Doc template, or the connection data within MAKE via functions?
Hi @nadworks
A doc template would have the placeholder hard coded there, so it would be tough.
Might I suggest perhaps using an html template and then with the help of conditional rules on Make remove the placeholders if empty.
Do you mean in the Doc?
I don’t know which ones will be empty. They’re just non-mandatory fields in a creative brief form. The user can leave some fields blank.
In Make, in the Google Doc module, instead of leaving a field blank, fill it in with {{emptystring}} instead of nothing. Hopefully that would prevent it from displaying the placeholder text.
I probably wasn’t clear.
I’m not leaving anything blank is the Google Doc module of the Make scenario.
The Google doc template has a number of {{variables}}, which reference completed fields from a Tally form. All fields have to be captured in case they get filled in, but not all are mandatory. When a field is not completed in Tally (and we obviously don’t know which ones a user might not complete), the Google doc that’s generated from the form submissions show the original {{variable}} instead of just an empty section.
I cannot explain it any better. But adding {{emptystring}} anywhere in the Google Doc module makes no sense.
So, if you want to avoid this whitespace issue, instead of filling the placeholder with {{emptystring}}, fill with something more random, like <remove me please>, anything that looks like it would be out of place.
Use a Google Docs Make an API call module after the Create a Document from a Template Module configured like this:
Thanks. How would that work with a Google Doc template, though, where I need specific content to go into specific places in a specific style to make up the document - i.e. a contract?
Your Google Doc Template should already have a bunch of {{placeholders}} all over it, right?
You can’t really suppress them, only replace them, then possibly replace them again.
Format your document the way you want it formatted and the replaced text will keep the format the previous text was in.
Do you have some screenshots or something else you can share to give more detail/context?