|
Division of Information Technology
Web Publishing @ SFSU
PADFORM
|
Using PADFORM
PADFORM uses a template and ACTION like CGIEMAIL, but the results are not sent to an E-mail address or stored in a file, instead it presents users with a web page they can print.
These directions assume that you have already created a web page form and template file using CGIEMAIL. If not, please review the Forms and CGIEMAIL documentation for directions on how t
o create these files.
Overview
- Visitors enter information into a web page form.
In this example, the web page form is called myform.htm
- The template file is called "formpage.htm"
- A template file describes how the form will be formatted.
Basic Steps
- Design the form
- Create the template file
- Determine the form 'Action'
- Test the form and template
The first part of using the program is to design the form. Look at the online
Forms instructions or
NCSA's information on Forms.
The following sample from the Forms page has one of each of the entry field types. I have used student, group, . . . as the field names below, but any name can be used.
The actual form looks like this.
PADFORM uses the same reserved words as CGIEMAIL and CGIFILE.
Unlike the other template files created in CGIEMAIL and CGIFILE the PADFORM template will actually be an HTML file that is displayed for the user to print.
By using the <pre> tag you can use spaces to change the alignment of items on your page. The PRE element indicates text that has been formatted for the screen and is rendered using a fixed-width font. All spaces and new lines are interpreted literall
y. HTML will normally collapses multiple spaces and new ines to a single space. Padform also allows the 'padding' of fields, using special characters. If you have a field of 30 characters and you wanted make sure you form had exactly 30 spaces, even if th
e user only types in 6, you would use the asterisk (*) symbol If you wanted those spaces to be underlined you could use the percent symbol (%).
<html>
<body>
<pre>
From: [%30,email]
Year: [year]
Subject: Sample Questionnaire
Group: [*12,group]
Year: [year]
Term: [term]
Major: [major]
My comments:
[comments]
</pre>
</body>
</html>
In your html file (myform.htm) replace cgiemail with padform
<form METHOD="POST" ACTION="/cgi-bin/padform/~accountname/formpage.htm">
Also, check the following:
- Replace ~accountname with your Internet Account name
- Replace formpage.htm with the name of your template file. In this example, the template file is called "formpage.htm".
Test the web page and make sure it returns an appropriately formatted page.
About |
Getting Started |
Create |
Publish |
Enhance |
Advertise |
Maintain
Index |
Glossary |
Software |
For more Information
Home
Search
Need Help?
1600 Holloway Avenue, San Francisco, CA 94132 (415) 338-1111
Last modified February 11, 2008 by the Web Team