help making a form

Any problem with HTML can be discussed here.
pryj
Posts: 56
Joined: Tue Dec 21, 2004 1:06 pm

help making a form

Post by pryj »

ok im trying to make a form for my website but its not really working.
This is my script so far.
Code:



Your Name Here


Your E-mail Here



Subject


Comments Or Questions






if someone could help me thanks[/code]


Challenged
Posts: 20
Joined: Sun Dec 26, 2004 2:20 pm

Post by Challenged »

Here's an Excellent HTML Tutorial - has forms, tables, blah blah - and is very systematic and you build a full web site from learning in the process..

http://www.mcli.dist.maricopa.edu/tut/ - its downloadable too..

Hope this helps.. Cheers
darkeyes
Posts: 9
Joined: Wed Feb 16, 2005 5:21 am

form code with javascript validation

Post by darkeyes »

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!-- start of script



function emptyvalidation(entered, alertbox)

{


with (entered)

{

if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}

}

}



function emailvalidation(entered, alertbox)

{

with (entered)

{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2)
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}

}

}

function formvalidation(thisform)

{

with (thisform)

{


if (emptyvalidation(first,"Enter your First name")==false) {first.focus(); return false;};
if (emptyvalidation(last,"Enter your Last name")==false) {last.focus(); return false;};
if (emailvalidation(email,"Enter Valid Email")==false) {email.focus(); return false;};
if (emptyvalidation(textarea,"Enter your comment")==false) {textarea.focus(); return false;};

}

}


// end of script-->
</script>
</head>

<body>
<form action="mailto:yourE-mailAddress@domain.com?subject=yourChoice" method="post" enctype="text/plain" name="contact" class="center" id="contact" onSubmit="return formvalidation(this)">


First Name:
<input name="first" type="text" size="25" maxlength="40" />
Last Name:
<input name="last" type="text" size="25" maxlength="50" />
</p>


Your E-mail:
<input name="email" type="text" size="20" maxlength="50" onChange="emailvalidation(this,'Invalid E-mail');" />
</p>


Subject:
<select name="select">
<option>Advice</option>
<option>Comment</option>
<option>Other</option>
</select>
</p>



<textarea name="textarea" cols="50" rows="4">Write Your Comments here...</textarea>
</p>



<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="reset" value="reset" />
</p>
</form>


</body>
</html>

I hope this helps
darkeyes
Posts: 9
Joined: Wed Feb 16, 2005 5:21 am

few more things to tell

Post by darkeyes »

note: i've wrote
<body>
<form action="mailto:yourE-mailAddress@domain.com?subject=yourChoice"


You have to put your email address there where u want the form to be forwarded (i've used email forward system but u can just change it) and i put a subject on it .. you put anything of your choice which will be ur email subject.

one more thing on the form i also added

Subject:
<select name="select">
<option>Advice</option>
<option>Comment</option>
<option>Other</option>
</select>
you can always change it..

but the easiest way to make a form look good is by using tables. if you have dreamweaver you can make forms without much knowledge of html. i hope it helps.
chamchom
Posts: 59
Joined: Mon Feb 28, 2005 3:20 pm

Post by chamchom »

u are not puting any HTML cods i will try to fix it for u when i will go home i need a program its much esay lol
cnnn
Posts: 6
Joined: Tue Mar 01, 2005 12:44 pm

Post by cnnn »

Challenged wrote:Here's an Excellent HTML Tutorial - has forms, tables, blah blah - and is very systematic and you build a full web site from learning in the process..

http://www.mcli.dist.maricopa.edu/tut/ - its downloadable too..

Hope this helps.. Cheers
thanks! :lol:
bookmark this site.
Gazza
Posts: 77
Joined: Thu Dec 30, 2004 2:40 pm

Post by Gazza »

cnnn wrote:
Challenged wrote:Here's an Excellent HTML Tutorial - has forms, tables, blah blah - and is very systematic and you build a full web site from learning in the process..

http://www.mcli.dist.maricopa.edu/tut/ - its downloadable too..

Hope this helps.. Cheers
thanks! :lol:
bookmark this site.
That website helped me to make a form for my fantasy website, an application form! Well done cnnn! :D
pooplematic
Posts: 243
Joined: Mon Feb 28, 2005 4:34 am
Contact:

Post by pooplematic »

interesting information. i may use that myself at some point so thank you ahead of time.
Here I am under my thinking tree, where so many free thoughts occur to me, but I notice mine's the only tree around. Because Prez said free thinking aint allowed.
toychoq
Posts: 108
Joined: Fri Apr 15, 2005 9:11 am

Post by toychoq »

da use bulit in frontpage forms
korsaan
Posts: 596
Joined: Sat Apr 09, 2005 2:55 pm
Contact:

Post by korsaan »

PM me man and i will try to help you

with my best wishes ,

KoRsAaN
Post Reply