Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Introduction

Document Generation Datalist Action is a plugin that exports form data to a Word document based on a specific template.

How to Set up the Plugin

Create a Form


Plugin Info

Plugin Available in the Bundle:

  1. Document Generation Datalist Action

This plugin bundle is compatible with Joget DX 8.


Expected Outcome

To successfully export form data to a Word document based on the template.


Get Started

Prerequisites

...

Create a word template

...

Create a word document template with general fields which will determine the layout. For example, if one want to create a

...

resume, the word template will be as shown

...

Sample Template

View file
nameSample_Template.docx
height250

...

in Figure 1.

Utilizing form field IDs as placeholders for replacing/retrieve actual data. These placeholders are represented as $(field_id), such as $(name) and $(email) etc.

Upload the word template in App's Resource

    1. Now upload this Word Template (the created word template) in the App's Resource in Joget as shown below:

...


Image Added
Figure 1: Word document template


Download Sample Template

View file
nameResume_Template.docx
height250


Steps

1. Import demo app from Download Demo App or follow Create form and datalist from scratch.

Create form and datalist from scratch

1. Get the plugin jar file from https://github.com/jogetoss/document-generation-datalist-action/releases.

2. Create a new form with the desired fields using form builder.

Image Added

Figure 2: Form Builder Form



3. Generate a CRUD by using Generate App option shown below:

Image Added

 Figure 3: Generate a Form CRUD


4. Now go to List Builder and choose the list of that form that was created earlier and drag and drop the Document Generation Datalist Action plugin element into the list as shown below:

Image Added  
Figure 4: Drag and Drop the Document Generation Datalist Action Plugin in the list 


5. Fill in the plugin configurations based on Document Generation Datalist Action Properties.


6. Save it and whenever a form is created or edited in the CRUD, it can be downloaded using the Download Generation Datalist Action button as shown below:

...

Image Added
Figure 5: Export the Document using Download Generation Datalist Action button
   

Using Hash Variable to Manage Template File 

1. Now upload this Word Template (the created word template) in the App's Resource in Joget as shown below:

Image Added

Figure 6: Upload Word template in the Apps's Resource


2

...

. Now click on the plugin → plugin Configuration →Template file bring the hash variable of the resource that was uploaded previously.

...

Download the form

...

Image Added

Figure 7: Get the hash variable of the Resource uploaded previously 


Document Generation Datalist Action Properties

Image Added

Figure 8: Plugin Configurations

Configure Document Generation Datalist Action

Name

Description

Template File

Template file created at Create a word template. You can use hash variable or directly upload the Template File in the field.

Form

Form to be exported into Word File.

Image Pixel Dimension (width x height)

Name

Description

Pixel Width

Image width to be exported to.

Pixel Height

Image height to be exported to.



Source Code and Plugin Download

  1. Please visit https://github.com/jogetoss/document-generation-datalist-action for the plugin's source code.
  2. You can find the latest release at https://github.com/jogetoss/document-generation-datalist-action/releases.
  3. Upload the plugin to your Joget by navigating to Settings > Manage Plugins > Upload Plugin as admin.


...

   

Download Demo App

...