Creating a PDF that submits data to a SQL Server Database Using .ASP

In this article we’re going to show you how to create a PDF form that will submit the users responses to a SQL Server database. To do this we’re going to take a standard PDF Form and place some form controls on it as well as a submit button.


For this tutorial you will need to have installed Microsoft IIS and SQL Server Express or Higher on a computer on your network or web site and be familiar with creating databases, tables and setting permissions for IIS and the database.


A Classic Active Server Page will be used for the tutorial, but you can easily translate it to the language of your choice.

Step 1 - Turn On The “Form” Menu Option

The first thing you should do, if you haven’t already done so is to turn on the “Form” Menu Option.


To do this, right-click on the menu area near the top of PagePlus and ensure the “Form” menu option is checked.

Click HERE to download the PagePlus X4 Project File

IMPORTANT NOTE ABOUT THE PROJECT FILE


You should delete the submit button (since it points to our Collect.asp script) and then add a new Submit button as shown in Step 7 below to cause the form to be submitted to your server’s collect.asp page.

Step 2 - Create a table in your SQL Instance

Step 3 - Open PagePlus X4, Create PDF

Step 4 - Naming the Text and Checkbox fields

Right-Click on the Check Box Field and select the “Form Field Properties” menu option.  When it appears, ensure you are on the “General” tab.  In the Name Field, type in “value_2” as shown below.   Then click OK.

Step 5 - Naming the Radio Button fields

Right-Click on the second radio button field and select the “Form Field Properties” menu option.  When it appears, ensure you are on the “General” tab.  Type ‘No’ into the “Name Field” and let’s call the “Field Group” - ‘YesNoMaybe’.  Then click OK. Right-Click on the Third radio button field and select the “Form Field Properties” menu option.  When it appears, ensure you are on the “General” tab.  Type ‘Maybe’ into the “Name Field” and let’s call the “Field Group” - ‘YesNoMaybe’.  Then click OK.

Step 6 - Creating ‘Collect.asp’

Step 7 - Adding the Submit Button

Step 8 - Testing Things Out

Summary

Privacy Policy Home

Commercial & Custom Web & Desktop Products

DataObjx is a participant in the Microsoft® Independent Software Vendor Program

DataObjx.net