Create Custom HTML Documents for Template Uploading
Once you publish your templates or template sets, you can upload the files to a Web server. This may be useful if you are developing templates for HotDocs Server, or if you want to make your templates available on an Internet or intranet site.
Since Web servers are configured to handle data exchange differently, you must customize the uploading process to meet your own needs. This requires you (or your Web server administrator) to create a custom HTML form, called the Publishing Form Page. This form can gather information about the user, the template set, or any other information required by your project.
Once this form has been created, the template developer can specify its URL as a destination for the upload. (This is done at the Publishing Options dialog box of the Publishing Wizard.) When the publishing process finishes, the form appears and template developers can provide the information required to complete the uploading process. Then, once they have provided the information and submitted the form, HotDocs posts that information, along with the template or template set, to the server.
As the information and the files are uploaded to the server, the server must know how to manipulate the data being sent from HotDocs. This requires you to create a second HTML document, called the Publishing Destination Page. This page contains scripting that can accept the HTTP POST from the Publishing Form Page. It should then process the data and files contained in the upload by entering metadata about the templates in a database, and then by copying the published files to the correct server locations, or by performing any other number of services your project requires.
During the publishing process, HotDocs logs a report about the uploading process. This report may be useful if you experience problems uploading your templates. To view this report, open 0hdUploadDebug.htm, located in the Local Settings\Temp folder (for example, C:\Documents and Settings\<username>\Local Settings\Temp\0hdUploadDebug.htm).
Publishing Form Page
The Publishing Form Page contains an HTML form. With this form, you can provide fields or other options for the template developer to add more information about the files being uploaded, such as template titles and descriptions.
You must follow certain criteria when creating the HTML form. First, you must name the form HotDocsPubForm. Second, the form ACTION must include an absolute URL path to the location on the server where you want to send the files. Last, any Select/Option fields (or drop-down/list/combo boxes) must have a VALUE attribute assigned, for example:
<option value="Option Text">Select the option</option>
Once the template developer provides the necessary information in this form, he or she submits the form and HotDocs adds the information to the published files. All the information is then uploaded (using HTTP POST) to the server.
Click here for an example of a Publishing Form Page.
Publishing Destination Page
After the uploading process is complete, the Publishing Destination page appears. This page accepts the HTTP POST from the Publishing Form page and then processes it by completing the actions specified by your project.
Once the information has been received on the server, the files from the upload must be decoded and handled. Several components are available to help with this process, including the Dundas Upload control, distributed by Dundas Software.
Click here for an example of Publishing Destination Page. (This page uses the Dundas Upload control.)