|
Frequently Asked Questions: translateformContents
What is translateform?MIT's general-purpose web server (web.mit.edu) does not allow users to run arbitrary CGI programs. In order to allow users of this server to create web forms, we support the use of the cgiemail script. translateform is a Perl script that converts an HTML file into a text template file formatted for use with cgiemail. It extracts the all INPUT, TEXTAREA and SELECT tags from forms within the HTML, and arranges them in the template by their field NAME assignments. How do I use it?The syntax is:
add cwis
translateform foo.html bar.txt
Where foo.html contains the actual email form (the html file) and bar.txt is the filename where you want the text template stored. It is important to note that translateform currently does not prompt for email addresses, so these will need to be added by hand in the resulting text file before it can be used by cgiemail. A simple comment form might result in the following translateform output:
From: [email]
To: INSERT YOUR ADDRESS HERE
Subject: [required-subject]
Errors-To: ccano@MIT.EDU
email: [email]
required-subject: [required-subject]
required-body: [required-body]
-------------------------------------------------------
Data
{begin-record}
[email] {field-separator}
[required-subject] {field-separator}
[required-body]
{end-record}
-------------------------------------------------------
NOTE: This message was sent using a WWW form. The address [email]
was typed manually, and may easily be incorrect.
Notice the To: INSERT YOUR ADDRESS HERE field is not correct. You need to change this to the recipient's email address.
Your email address is filled in the [required-subject] are the names of the form fields extracted from the HTML file. What is that Data section?All the text below the translateform -p foo.html bar.txt Leaving it in, however, will not affect anything. How do I use it with Discuss?Often times, you will want to archive your form's replies in a Discuss meeting. Just make the What if I plan to use the form to collect data for a database or spreadsheet?translateform is often used in conjunction with process-comments to collect data from web forms for inclusion in a database or spreadsheet. The text translateform creates under the Some things to consider if you plan on importing data into a spreadsheet or database are the order and number of fields you are collecting. The order of the fields in the Are there any known bugs?There are currently no bugs in translateform. If you encounter any, please send email to web-help@mit.edu.
|
| Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility Ask a technology question or send a comment about this web page. |
||