<form action="/cgi-sys/formmail.pl" method="post"> <!-- ********** hidden fields ********** --> <!-- determines where form will be emailed --> <input type="hidden" name="recipient" value="user@example.com" /> <!-- determines subject of form email --> <input type="hidden" name="subject" value="Email Form Example" /> <!-- includes information about the user's browser in the form email - -> <input type="hidden" name="env_report" value="HTTP_USER_AGENT" /> <!-- ********** fields that will appear for the user to fill out ********** --> <!-- allows the user to input his or her name --> Name: <br /> <input type="text" name="realname" id="name" /><br /> <!-- allows the user to input his or her own email address --> Email: <br /> <input type="text" name="email" id="email" /><br /> <!-- displays a textbox for the user to enter comments --> Comments: <br /> <textarea name="comments" id="comments" rows="5" cols="30"></tex- tarea><br clear="all" /> <!-- radio buttons allowing the user to choose his or her favorite color --> <label for="color">What is your favorite color?</label><br /> <input type="radio" name="color" value="red" id="color" />Red<br /> <input type="radio" name="color" value="blue" id="color" />Blue<br /> <input type="radio" name="color" value="yellow" id="color" />Yel- low<br /> <!-- ********** buttons ********** --> <button type="submit" name="submit">Submit This Form</button> </form>
The above HTML, included in an HTML document, will produce a form that looks similar to the following: