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:



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:



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:


Was this article helpful?
59 out of 86 found this helpful


  • 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:
    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?

  • 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)

  • 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.?

  • Hi Alan,

    There's a Page Break button you can use in the editor (looks like this:

    For more commands, you can check out the Smarty documentation here:


  • 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?

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

  • Hi Renee,

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


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

  • Hi Brandon,

    Please try this CSS in the Source of your document:

  • 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.

  • 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:

  • 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;

  • 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:

  • 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?


    Figured it out...

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

    This worked for the whole document...


  • 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?

  • 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.

  • Hi Jeremy,

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


  • Hi Anacleto,

    Yes, like this:

    {if $score >= 5 and $score <= 10} .... {/if}

  • Hi Jeremy,

    Thank you so much for the good news!

  • Hi Jeremy,
    Currently I am trying to build a document with advanced css 3 features.
    I am trying to use 'transform: rotate(90deg);' but it does not display properly when pdf is generated.
    Does WebMerge support css 3?

  • Hi Rens,

    You will want to do something slightly different. You'll want to use "rotate: 90" or "rotate: -90" instead of "transform: rotate(90deg)"

  • Hi Jeremy,

    I have an existing HTML template which refer to external CSS. Is there a way to upload the CSS file so that my HTML can refer to it?

    Thanks in Advance..

  • Hello Nidzie,

    Thank you for your question! Using the Document Builder, can you go into Advanced Mode and paste your CSS code? Does this seem like an option? Please reach out if you have more questions!

  • Hi Guys,

    I've a question, how to add image on header and footer using Document Builder?



Please sign in to leave a comment.