Search

Word Auto-Fill Solution: Word Document Generation using Gravity Forms

Listen to this article
Word-AutoFill-WordPress
Automate Document Generation using Word Auto-Fill

The popularity of e-documents has surely been boosted by offices with a go-paperless goal. But along with the use of such documents, several companies have even employed processes to automate document creation a.k.a., Document Automation.

“To err is Human” – An important reason why many companies are looking to automate processes, is to avoid any unwanted clerical errors.

For your WordPress website, if you wanted to automatically generate Word Documents for user entered data, the Word Auto-Fill solution, is just what you need.

[space]

What is the Word Auto-Fill Solution?

The Word Auto-Fill solution automates the process of generating Word Documents, using data (entered through an online form). Instead of an exact mapping of an online form to a Word Document, this particular solution allows you to define your own document template (or an out-line) and map individual form fields to fields in the template. Thus you can custom create a Word document as per your needs.

[space]

Word Auto-Fill: Features

As a functionality integrated into your WordPress website, the Word Auto-Fill solution provides a user the following options:

  • Option to Upload Word Document Templates: The administrator has an option to upload and save the Word Document Templates, he creates. A Template is a blue print of the Word Document which will be created.
  • Online form to Word Document(s) Mapping: The data to be filled in the Word Document will be read from an entry made using an online form. A Mapping Page allows the administrator to decide and map a Form to one or more Word Documents.
  • Document Generation with Export Options: When user enters his/her information in the online form, the data is saved to a database. The administrator can then, go to the Document Generation Page, to export the needed docx files.
  • Download and Email options: The administrator can either download and save the generated .docx file, or email the file as an attachment, if needed.

[space]

Word Auto-Fill: Document Generation

The Word Auto-Fill functionality currently works with the Gravity Forms Plugin. You will need to install and activate the Gravity Forms plugin on your site, to use this functionality. Do note: the solution can be customized to be used with any Form Builder plugin, provided that form entries are saved in the database.

Build a Form with the Gravity Forms Plugin

The Gravity Forms plugin provides you an easy option to add fields to your form. The names of the form fields will be used to map individual values to fields in the document template. To ensure accurate mapping of field values, make sure that the field name does not contain any special characters.

Gravity-Form-Field-Creation
Create a Gravity Form

[space]

Create a DOCX Template

The next step is to create the DOCX template in MS WORD 2007 and map the appropriate form fields. You have to create a DOCX file with empty values. Then, you need to then use the form fields as the placeholders for these values.

For example, if you have created a Gravity Form with a field ‘Project_Name’, the placeholder for the corresponding field is ${Project_Name}.

Word-Document-Template
Create a Document Template

[space]

Upload the DOCX Template

The Word Auto-Fill functionality provides an option to upload ‘Word Templates’. This option is similar to adding a new file in the media library. Once you have uploaded the created DOCX template, you can move on ahead and map the template to your forms.

Map Gravity Form to DOCX Template

After having successfully uploaded the DOCX template, you need to map the Gravity Form to the template. Even though you have added the placeholders for field names, you still need to perform this upper level mapping, to generate the needed DOCX files. You can map multiple DOCX templates to a single Gravity Form.

Word-Document-Mapping-Page
Map Word Document Templates to Gravity Forms

Generate and Download the DOCX File

In your dashboard, the Word Auto-Fill functionality adds an admin option, to ‘Create DOCX File’, for every Gravity Form entry (provided of course that you have mapped the form to one or more DOCX templates). A similar link can also be provided in the frontend, if you wanted to provide users an option to download a DOCX file, upon document submission.

Create-Docx-Using-Form-Entries
Generate Word Documents

The generated file, can be either downloaded, or emailed, to the needed person.

Document-Download-Email
Download or Email the Generated Document

 

After completing the steps, you will have successfully created the required Word Documents. The templates and mapping are of course saved in the database, to allow you to create documents when needed. The Word Auto-Fill solution thus serves an integral purpose in the document automation process, by eliminating the need for manual effort (thus reducing error), increasing data security and reducing cost.

Namrata

Namrata

17 Responses

  1. is there any plugin for that in wordpress .i need this configuration in my site .How can i upload the template in the site .

    1. Hey,
      There is a solution available. If you are interested in purchasing the solution a person from our team will contact you. The documentation will be available along with the solution.

    2. Hi,
      I purchased the word auto-fill. On your website it states that you have to upload a docx template. As far as I understand templates are dotx not docx. Do I need to upload docx or dotx ? When I create either of them in Word 2007 and I upload it, it appears in the list. But when I try to map it it a form, it shows my form but not the template.

  2. Hello, the plugin only displays English characters correctly any other language like Latvian or Russian will be complete jibberish I modified the phpWord library to stop encoding the characters to utf8 but the problem still persists. How to fix this problem?

    1. Dear Readers,
      The word-autofill plugin displays only english characters correctly. Armands had asked us here about displaying languages like Latvian or Russian. This is an issue with the PHPWord library. Now Armand was kind enough to share the fix with us once he had found it. Here’s what he says in his email – “I removed the utf8 encoding in all of the PHPWord library files to display languages like Latvian and Russian” He has also shared the library with us. If any of you might be interested please feel free to contact us!

      Thanks alot Armands!!

  3. Hi again.

    I have a question. I bought Pdf autofill because I though it will work well. I guess it should be but after I bought it I learned that it doesnt work on shared hosting serveur because we have to install pdftk on the server root (we dont have access to the root on this kind of server) and that almist all provider doest not support pdftk (so they cant install it for us).
    So my question is if its possible to have the word version abd only pay the difference (I think word doesnt need any library) or be refund.
    Other thing… if you can explain that on your website it will be great. If i had information at the beginning Ill buy directly the word vertion and do not loose weeks ….
    Thx

    1. Hi David,

      We have mentioned in the FAQ section on the product page that to make the plugin work on a shared hosting server you will need to install a library in the server’s root folder. Once you have done so, the plugin can be used without any issues.

      It is unfortunate that you should have missed this information. I shall ask someone from the products team to contact you. We will try to help you in the best way we can.

  4. Another question: the field label cannot contain any spaces. But the problem is that whatever you enter in the field label, becomes visible in your form. So if you use underscores (as in your example on your website) the customer also sees the underscores on the form. Is there a way around that?

    1. Hi Auke,

      With the latest update of the plugin, you can add spaces to the field name, just no special characters 🙂

      (Thanks for pointing this out, I have updated the article)

Leave a Reply

Your email address will not be published. Required fields are marked *

Get The Latest Updates

Subscribe to our Newsletter

A key to unlock the world of open-source. We promise not to spam your inbox.

Suggested Reads

How to Make Responsive Tables using CSS without Tag
WordPress Development

Custom WordPress Solutions, for You

LearnDash Development

Custom LearnDash Solutions, for You

WooCommerce Development

Custom WooCommerce Solutions, for You

WordPress Plugins

Scale your WordPress Business

WooCommerce Plugins

Scale your WooCommerce Business

LearnDash Plugins

Scale your LearnDash Business

Label

Title

Subtext

Label

Title

Subtext

Join our 55,000+ Subscribers

    The Wisdm Digest delivers all the latest news, and resources from the world of open-source businesses to your inbox.

    Suggested Reads