forms

Discussion in 'HTML & Website Design' started by rojojat, Mar 10, 2009.

  1. #1
    Hi,
    I have a form script

    <html>
    <head><title>contact form</title>
    <style>
    body{text-align:center}
    #main{width:40%;height:45%;margin-top:100px;margin-left:auto;margin-right:auto;padding-top:15px;font-family:Arial, Verdana, Helvetica, sans-serif;color:#cc0000;background:#eee}
    </style>
    <script type="text/javascript">
    function validate()
    {
    var at=document.getElementById("email").value.indexOf("@");
    var fname=document.getElementById("fname").value;
    submitOK="true";

    if (fname.length>10)
    {
    alert("The name may have no more than 10 characters");
    submitOK="false";
    }

    if (at==-1)
    {
    alert("Not a valid e-mail!");
    submitOK="false";
    }
    if (submitOK=="false")
    {
    return false;
    }
    }
    </script>
    </head>

    <body>
    <div id="main">
    <form action="/gdform.php" method="post" onsubmit="return validate()">
    <input type="hidden" name="subject" value="Form Submission" />

    <input type="hidden" name="redirect" value="thankyou.html" />

    Name:<br/> <input type="text" name="fname"id="fname" size="20"><br /><br />
    E-mail:<br/> <input type="text" name="email"id="email" size="20"><br /><br />
    Comment:<br/> <TEXTAREA rows=4"></TEXTAREA>

    <br />
    <input type="submit" value="Submit">
    </form>
    </div></body>

    </html>

    When I check the email that the form is foward to I get the name and email results but not the comments.
    Can someone tell me What am I doing wrong?
    thanks
     
    rojojat, Mar 10, 2009 IP
  2. MikeHayes

    MikeHayes Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Comment:<br/> <input type="text" name="comment"id="email" size="40">
    <TEXTAREA rows=4"></TEXTAREA>

    Try adding the <input type etc> tag to the comment row.

    Mike
     
    MikeHayes, Mar 11, 2009 IP