Example of a web form that does not rely on a server-side scriptThis is one example of how a web-based form might be implemented in a web page without relying on server-side CGI scripts. You can email the results of the form in a plain text message by making the ACTION of the form a "maito:" command rather than the name of a script or program on the web server. Please note this is an imperfect and unreliable solution. Use At Your Own Risk! Disclaimer: The user who submits the form MUST have an email account set up on the computer account they are currently using or the contents of the form will not be delivered! A message to this effect should accompany this form so there are no misunderstandings about whether or not the form contents will reach the intended email recipient. It probably should go without saying (but I'll say it anyway) that the mailto: email address for the recipient should also be valid. The email address in the sample form below is not valid and must be changed before the form will work properly. You should replace username@norman.k12.ok.us with your valid email address. When someone fills out the form and clicks on the "submit" button, their responses will be sent to that email address in a plain text format. The HTML source code for this simple "no-script" (non-CGI) web form is shown below the sample form. Feel free to copy it, paste it into your web document, and modify it for your own use. This example contains text blanks, radio buttons, check boxes, and a text field. You will probably not need all of those input options.
Online Absence / Tardy Form
<H3> Online Absence / Tardy Form </H3> <FORM NAME="Test Form" METHOD=POST ACTION="mailto:userid@norman.k12.ok.us" ENCTYPE="text/plain"> <INPUT TYPE="hidden" NAME="FORM NAME" VALUE="A Quick No-Script Web Form"> <P> Name: <INPUT TYPE="text" size="50" NAME="Name"> <P> Student ID# <INPUT TYPE="text" size="8" NAME="Number"> <P> I am a... (Select one):<BR> <INPUT TYPE="radio" NAME="Class" VALUE="Senior" CHECKED>Senior <INPUT TYPE="radio" NAME="Class" VALUE="Junior">Junior <INPUT TYPE="radio" NAME="Class" VALUE="Sophomore">Sophomore <INPUT TYPE="radio" NAME="Class" VALUE="Freshman">Freshman <INPUT TYPE="radio" NAME="Class" VALUE="Other">Other <P> Quick Excuses (Select all that apply): <BR><INPUT TYPE="checkbox" NAME="Sick"> I am sick. <BR><INPUT TYPE="checkbox" NAME="Truant"> I am sick of school. <BR><INPUT TYPE="checkbox" NAME="Gas"> My car ran out of gas. <BR><INPUT TYPE="checkbox" NAME="Dog"> I was trying to retrieve my homework from a rabid dog. <BR><INPUT TYPE="checkbox" NAME="Breakfast"> I stopped for breakfast. After all, it is the most important meal of the day! <P> Detailed excuses:<BR> <SMALL>You may type additional excuses or explanations in the space below</SMALL><BR> <TEXTAREA NAME="Explanations" cols="45" rows="8"></TEXTAREA> <P> <INPUT TYPE="SUBMIT" VALUE="Send info"> <INPUT TYPE="RESET"> </FORM> |