Versions Compared

Key

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

Table of Contents

 

In this tutorial, we will following the guideline of developing a plugin to develop our Download PDF Datalist Action plugin.

1. What is the problem?

We need to provide a PDF download feature when user click on a link/button on a datalist. The downloaded PDF file should be a form with data populated.

2. What is your idea to solve the problem?

We can develop a Datalist Action Plugin to display a button for generate a form PDF file. 

3. What is the input needed for your plugin?

To develop a PDF Download Datalist Action plugin, we can consider to provide the following as input.

  1. Form ID : The form that will be used to generate the PDF file.
  2. Record ID : Use the id of the datalist row or a column value to load the record.
  3. File Name : File name of the the generated PDF file.
  4. Formatting options : Options to format and customise the PDF output. 

4. What is the output and expected outcome of your plugin?

When PDF Download Datalist Action is used as datalist row action or column action, a normal user will see a link to download the PDF file in every rows of a datalist. Once the link is clicked, a PDF will be prompt to download.

When the plugin is used as whole datalist action, a zip file containing all the generated PDF of every selected rows will be prompt to download when the button is clicked.

5. Is there any resources/API that can be reuse?

To develop the PDF Download Datalist Action plugin, we can reuse the methods in FormPdfUtil to generate a form as PDF. We can also refer to the source code of the Datalist Form Data Delete Action plugin as well. Other than that, we can refer to the Export Form Email Tool on what kind of plugin properties options we can provide in the plugin as the Export Form Email Tool are using the methods in FormPdfUtil as well.

6. Prepare your development environment