How do I write a web form to save data to a comma-delimited file?
The IT Center provides a modified version of the FormMail perl script for use by authorized departments. If you are unsure whether your department's website can use the Form2CSV service, please contact IT Center System Administration. The service also has limits on where data files can be placed.
Use of Form2CSV requires knowledge of HTML forms. Basic configuration options are given below, required options are red:
|
| Setting: | form action |
| Purpose: | tells the client's web browser where the Form2CSV script is located |
| Example: | <form method="post" action="http://www.health.ufl.edu/cgi-bin/Form2CSV.pl"> |
|
| Setting: | csvfile |
| Purpose: | The absolute path to the file where data should be written. For security reasons the web server can't create or edit files by default. You should contact IT Center System Administration to find out where your file will be located. |
| Example: | <input type="hidden" name="csvfile" value="/dev/null" /> |
|
| Setting: | sort |
| Purpose: | The order in which to sort the data entries |
| Example: | <input type="hidden" name="sort" value="department,shoesize,title,address" /> |
|
| Setting: | required |
| Purpose: | A list of the names of fields in the form that are required |
| Example: | <input type="hidden" name="required" value="email,realname,shoesize" /> |
|
| Setting: | redirect |
| Purpose: | A custom page to send the user to after they have successfully submitted a form |
| Example: | <input type="hidden" name="redirect" value="http://www.health.ufl.edu/input_appreciated.html" /> |
|
| Setting: | missing_fields_redirect |
| Purpose: | A custom page to send the user to if they submitted the form without filling in a required field |
| Example: | <input type="hidden" name="missing_fields_redirect" value="http://www.health.ufl.edu/missing_input.html" /> |
|
Document http://
www.health.ufl.edu/itcenter/helpdesk/network/net_5.shtml
UF Health Science Center | UF Health Science Center Jacksonville
Copyright © 2005 | University of Florida
|