Using the Document Builder (Build Your Own)

In addition to uploading a PDF or Word document, we provide an online Document Builder.  When creating a New Document, choose the "Build Your Own" document type.  You'll then be taken to the Document Builder and you will need to insert your own fields into the document, creating a template for your data.  This is actually quite simple.

The format for a field is {$fieldName} - and you will want to make sure not to start the field name with a number or have any spaces.

Here are a few examples of acceptable fields:

  • {$name}
  • {$EmailAddress}
  • {$Home_Phone}

Here are a few examples that are NOT acceptable

  • {$1stName}
  • {$email address}
  • {$1234}
  • {$phone-number}

 

The Build Your Own documents also have the ability to customize your document and the data that is received by processing it through different functions.  For more information on what you can do, please take a look at our Tips and Tricks

Here a quick image that gives you a visual representation of how to setup your documents:

document_builder.png

 

If you're looking for easy ways to insert items into your document, like Merge Fields, If statements, Loops, you can use our "Insert" functionality on the right side of the document builder.

Here are the options:

 document_builder_insert.png

 

You can also format the document text and insert items like images, tables, etc using the tool bar at the top of the document builder.  This is very similar to the options available in Microsoft Word:

document_builder_toolbar.png

Have more questions? Submit a request

17 Comments

  • Avatar
    Ryan Robinson

    I have custom inputs what is the proper formet, for my custom inputs?
    Here is what my Gravity Form looks like:
    Referred By Dr:
    {Referred by Dr::1}
    Today's Date:
    {Today\'s Date:2}
    Referral Location:
    {Referral Location:29}
    Introducing Patient:
    {Introducing Patient:3}
    Name of Parent / Legal Guardian:
    {Name of Parent / Legal Guardian:14}
    Account Number:
    {Account #:4}
    Phone Number:
    {Phone:5}
    Email:
    {Email:26}
    Date of Birth:
    {Date Of Birth:12}
    Pano Taken Date:
    {Pano Taken Date:13}
    Evaluation Type:
    {Evaluation Type:7}
    Ortho Appointment Date:
    {Ortho Appointment Date:31}
    Ortho Appointment Time:
    {Ortho Appointment Time:32}
    Potential Orthodontic Problems:
    {Potential Orthodontic problems::8}
    Special Instructions:
    {Special Instructions::9}

    I keep getting an error that says this:
    There is an error in your document: (word/document.xml) Syntax Error in template "string:" on line 9 "
    {$Ortho Appointment Date:31}" - Unexpected ":", expected one of: "}" , " "

    I dont know what is exactly wrong.. Can anyone point me in the right direction, so I dont get this error anymore?

  • Avatar
    Jeremy Clarke

    Hi Ryan,

    You're not allowed to use special characters in your merge fields. Only letters, numbers, and underscores. So instead of {$Ortho Appointment Date:31} you need to use something like {$Ortho_Appointment_Date} (leave out the colon as well)

  • Avatar
    Alan Nafziger

    So... How do I insert a page break in the Build Your Own editor? Is there a list of commands somewhere (like {if}, {foreach}., etc.?

  • Avatar
    Jeremy Clarke

    Hi Alan,

    There's a Page Break button you can use in the editor (looks like this: https://cl.ly/0p062B1R1P3B)

    For more commands, you can check out the Smarty documentation here: http://www.smarty.net/docs/en/

    Thanks!

  • Avatar
    Renee Siegel

    Jeremy,
    I've built several forms in WM. I'm routing them through either DocuSign or Adobe Sign for e-signatures. I've used the appropriate code (via the Builder) on each document for that respective e-sign company. My problem is that the code doesn't disappear when you are in either DocuSign or AdobeSign and obtaining the e-signatures. Since these forms will be used as legal documents, I'd like for that not to show on the PDF under the e-signature. How can this be resolved, or can it?
    Thanks!

  • Avatar
    Renee Siegel

    Jeremy,
    Part 2--My apologies--it seems to only be happening with the DocuSign documents. Adobe Sign doesn't show the e-signature code.

  • Avatar
    Jeremy Clarke

    Hi Renee,

    Simple make the font color for the tag in your document a white or light gray and that will fix it :)

    Thanks!

  • Avatar
    Brandon Ciancio

    Is there a way to remove or specify margins of the generated word doc?
    (overall document and not sub divs)

  • Avatar
    Jeremy Clarke

    Hi Brandon,

    Please try this CSS in the Source of your document:

    @page {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 15px;
    margin-right: 15px;
    }
    <style>

  • Avatar
    TVP Finance

    Hi Jeremy,

    Is there a way to import a PDF into Document Builder? For some context, the first page contains dynamic text (and needs to be in Document Builder) and the second page is static and contains tables. For the latter, I was able to create the tables in Adobe, but unable to replicate the table style in Document Builder.

  • Avatar
    Jeremy Clarke

    Unfortunately, there isn't a way to import a PDF into the document builder, but would a Word document work for you instead? That might be easier to build your tables. More info: https://support.webmerge.me/hc/en-us/articles/206526926-Create-Word-DOCX-Documents

  • Avatar
    Drew Fuest

    Hello,

    I tried setting the margins for my document that I created using the following pasted at the top of the document source:

    Please try this CSS in the Source of your document:

    @page {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 15px;
    margin-right: 15px;
    }

    It just shows what I pasted and nothing else...

    Can you please let me know what I am doing wrong.

  • Avatar
    Jeremy Clarke

    Hi Drew,

    You'll need to put that CSS inside style tags of the HTML of your document. To do that, click the Source button in the editor, then paste this code:

    @page {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 15px;
    margin-right: 15px;
    }

  • Avatar
    Drew Fuest

    Hi Jeremy,

    Thanks for getting back to me so quickly!

    I pasted the following right at the top of the page after pressing the Source button..

    That did not seem to work for me...I am not sure where the style tags are...what should I be looking for?


    Edit:

    Figured it out...

    <style type="text/css">@page {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 100px;
    margin-right: 100px;
    }
    </style>

    This worked for the whole document...

    Thanks!

    Edited by Drew Fuest
  • Avatar
    Darius Grimes

    I really like using the advanced HTML to refine reports but its nice to use the builder to build the basic HTML statements quickly. Unfortunately when switching between views it re-formats the HTML window and the previously nicely sorted code is changed. Is there a way to use 2 browsers or 2 browser windows/tabs to control the smarty builder in one and then keep the HTML layout in the other?

  • Avatar
    Jeremy Clarke

    Hi Darius,

    Unfortunately, no there isn't a way to do that. Sorry! It is a limitation of the WYSIWYG editor - it automatically tries to "fix" HTML that it finds invalid.

  • Avatar
    Anacleto Feliciano

    Hi Jeremy,

    Is it possible to have an if/else statement something like this?
    if score >= 5 but <=10

    Thanks!

Please sign in to leave a comment.
Powered by Zendesk