How2 add a form to your site
 
This article is about the form that I have created using the Mailto: command at www.iWebUSerSites.com for submitting sites.
 
Before I start and try to take any credit for this, I found the bulk of the information that I needed at: http://www.htmlgoodies.com
 
I used two articles, firstly: So, You Want A Form, Huh? this article gives an overview of the type of fields that you may find in a form.
 
Then I took the code from: So, You Want A Guestbook, Huh? and adapted it to meet my needs.
 
Rather than repeating all of the information on these pages I would suggest that you read the articles linked above.
 
This method does mean that the users default mail application is launched to send the data.
 
The form that I created is shown below (followed by the code):
 
Shown below is the code that created the form above, adapted from Gusetbook code:
 
<H3> Submit your site...</H3>
<FORM METHOD="POST" ACTION="mailto:will@iwebusersites.com?subject=Please add my site" ENCTYPE="text/plain">
<BR>
<B>Please enter your url, (http://web.mac.com/YourUserName or http://www.YourDomainName.com):</B>
<BR><INPUT NAME="url" size="80"> <BR>
<P>
<B>What is the topic of your site (i.e. Photography)?</B>
<BR>Only one topic per site please, if you dont see a suitable topic, then feel free to suggest a new one!<BR>
<INPUT NAME="topic" size="40"> <BR>
<P>
<B>Which category does your site fall into?</B>
<P>
<INPUT TYPE="radio" NAME=Category is VALUE="Personal">
Personal
<INPUT TYPE="radio" NAME=Category is VALUE="Biz">
Business
<INPUT TYPE="radio" NAME=Category is VALUE="Group">
Group
<BR>
<P>
<B>Please enter your e-mail address: 
<BR>(This will only used by iWebUserSites to contact you)</B>
<BR><INPUT Name="usermail" size="50">
<P>
<B>Which country are you from?</B>
<BR><INPUT Name="Country" size="30">
<P>
<B>What language(s) is the content of your site?</B>
<BR><INPUT Name="Language" size="30">
<P>
<B>Add any comments you'd like below:</B>
<BR><TEXTAREA NAME="comment" ROWS=6 COLS=60></TEXTAREA>
<P>
<CENTER>
<B>Thanks for contributing to www.iWebUserSites.com!<BR>
Clicking "Send it!" will launch your mail application</B>
<BR>
<BR>
<INPUT TYPE=submit VALUE="Send it!">
<INPUT TYPE=reset VALUE="Reset Form">
<BR>
<P><B>Please use the navigation links at the top of the page to continue browsing</B>
</CENTER>
</FORM>mailto:will@iwebusersites.com?subject=Pleasehttp://web.mac.com/YourUserNamehttp://www.YourDomainName.comhttp://www.iWebUserSites.comshapeimage_1_link_0shapeimage_1_link_1shapeimage_1_link_2shapeimage_1_link_3
 
To add this html to the page that I wanted to display it in, I created a text box (the size of which is trial and error), then inserted the text FORMTEXTGOESHERE, this is shown below:
 
 
Next, I published the site. Then using MassReplaceIt I did a Find and Replace on the AddMe.html file, I searched for FORMTEXTGOESHERE and replaced it with all of the code shown above. Then when I visited the site I saw the form that I had created, Click Here to see an example of using MassReplaceIt.
 
The format in which the email comes through is not very pretty, but it is readable, as below:
 
 
Before adding, ENCTYPE="text/plain" to the end of the mailto: line it was even worse!