🎉  Build a workflow powerhouse. Learn more about our new Airtable integration.   🎉

January 20, 2015

Populate a Word Document From an HTML Form

Building your own HTML forms for your website is pretty easy, but what if you want to save that information collected on the form inside a Word document?  That’s no quite as easy.  Unless you have WebMerge!  With WebMerge you can take the information that your customers submit through the online form and automatically populate a Word document that you have saved in WebMerge.

For this example we’re going to show you how you can create a resume creator that allows visitors to your website to fill out information about their career and they’ll be presented with a completed resume.

To get started we’re going to setup our resume template in WebMerge.  We’ve already setup the document using Word and put in our merge tags where we want the answers to our form to go.  Here’s what the template looks like:

Now that we’ve got the document setup in WebMerge we’re ready to connect it with our online form.  When building your online form you’ll want to make sure to use the same field names on the form that match your merge tags (ie “first_name” on your form = “first_name” in your document).  Here’s part of the HTML for our form:

As you’ll see at the top of our code, the form “action” is pointed at our document’s Merge URL.  You can find this URL under the Merge tab for your document.  This is a unique URL that you can send your data to and we’ll generate the document on the fly.

Now that we’ve got our form setup on our website, we’re ready to do a test!  Simply fill out the form with your information and hit the submit button.  You should be presented with a file download of your document.  Here’s what our example looks like:

That wasn’t so bad, was it?  Can you think of any other online forms you have that could be used to generate documents?

Please don’t hesitate to contact us if you have any questions.

3 min read

Ready to give Formstack Documents a try?
Start your Free Trial now!


Create Documents With WebMerge Now

By signing up here, you agree to our Terms of Use