Forms and questionnaires

You can do forms and questionnaires on web pages. On mail.sas, the program to use is called "formmail". On cattell.psych, it is "mailform". Both of these are cgi scripts. You must use one of these two; you cannot write your own cgi script because of security concerns.

You may also want to look into JavaScript, a programming language, that is used a lot in web forms, e.g., for checking responses before they are submitted.

Formmail

To use formmail on mail.sas, you include in a web page something like the following: <form method="post" action="http://www.sas.upenn.edu/cgi-bin/FormMail.pl"> <input type="hidden" name="recipient" value="baron@sas.upenn.edu" /> <input type="text" name="feedback" /><br /> Please enter your comments<br /> [more questions and form elements] <input type="submit" /> </form>

Instead of "baron" put your own username. You must use @sas.upenn.edu and not @mail.sas.upenn.edu or @psych.upenn.edu. The program will then send you an email message with your "names" (of input statements) in the order in which they appear, each followed by the value that the subject typed.

For further options, see the README and EXAMPLES files in /pkg2/src/formmail/ on mail.sas.

Mailform

To use mailform on cattell.psych, you include in a web page something like the following: <form method=POST action="http://www.psych.upenn.edu/cgi-bin/mailform?baron@psych.upenn.edu"> <input type=hidden name=v1 value="somename"> <P>How old are you? <input type=text size=3 name=age><br> [other input tags - see an html guide for these] <center><input type=submit value="Submit responses"></center><br> </form>

Instead of "baron" put your own username. The program will then send you an email message with your "names" (of input statements) in alphabetical order, each followed by the value that the subject typed.

When you use this program, you must tell the user that it gives the name of the user's computer, that is, everything after the @ sign in the email address. It does not give you the username, so you must ask for that in the form if you want it.

Full instructions are here, but you may not need to read them all, unless you want to try some of the options.