Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Blank messages from contact us form

Options
  • 12-04-2011 2:00am
    #1
    Closed Accounts Posts: 2


    Hi,

    Could anyone please help. I regularly receive emails from my contact form, but the messages are always blank. The messages are complete when I fill it up myself and test it, but when potential clients or something else triggers the form, the e-mail is always empty.

    Clients are elderly people who may not be able to get over the captcha. Is it possible that the form will send a blank e-mail when the captcha isn't entered correctly or at all?

    Is there anything wrong with my form? Any help would be appreciated.

    Here is my code:

    <script type="text/javascript" src="INCFOLDERinc/lib/validate.js"></script>
    <script type="text/javascript">
    function ValiDate2(form)
    {

    if(isEmpty(form.fname, "Please Enter First Name")){return false}
    if(isEmpty(form.lname, "Please Enter Last Name")) {return false}


    if(isNotValidEmail(form.email, "Please Enter Valid Email")) {return false}
    if(isNotValidEmail(form.email2, "Please Enter Valid Email")) {return false}
    if(isNotSame(form.email2, "Please Enter Valid Email")) {return false}



    if(isEmpty(form.message, "Please Enter message")) {return false}

    }
    </script>
    </head>

    <body>

    <table width="1000" cellpadding="0" cellspacing="0" align="center" border="0" style="background-image:url(images/main.jpg); background-repeat:repeat;" class="top">
    <tr valign="top">
    <td><div class="menu" align="center"><table width="965" border="0" class="nav_text">
    <tr align="center" >
    <td width="8%" height="23"><div align="center"><a href="index.php">Home</a></div></td>
    <td><div align="center">|</div></td>
    <td width="16%"><div align="center"><a href="choose_us.php">Why Choose Us</a></div></td>
    <td><div align="center">|</div></td>
    <td width="13%"><div align="center"><a href="report.php">Free Report</a></div></td>
    <td><div align="center">|</div></td>
    <td width="14%"><div align="center"><a href="implants.php">About Implants</a></div></td>
    <td><div align="center">|</div></td>
    <td width="13%"><div align="center"><a href="videos.php">Videos</a></div></td>
    <td><div align="center">|</div></td>
    <td width="11%"><div align="center"><a href="about_us.php">About Us</a></div></td>
    <td><div align="center">|</div></td>
    <td width="11%"><div align="center"><a href="blog/index.php">Blog</a></div></td>
    <td><div align="center">|</div></td>
    <td width="14%"> <div align="center"><a href="contact_us.php">Contact Us</a></div></td>
    </tr>
    </table></div></td>
    </tr>
    <tr class="logo_section">
    <td><table width="965" border="0">
    <tr>
    <td width="59%" align="left"><a href="index.php"><img src="images/logo2.jpg" height="105" width="320" border="0" /></a></td>
    <td width="14%"> </td>
    <td width="27%" align="center"><img src="images/call.jpg" height="91" width="237" /></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>
    <div class="body_main" align="center">
    <div class="top_body"><img src="images/body_uper.jpg" height="12" width="975" /></div>
    <div class="body_mid">
    <div class="header"><img src="images/header.jpg" height="225" width="955" /></div>
    <div class="canvas">
    <table width="100%" >
    <tr>
    <td width="48%" valign="top">
    <table cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
    <td class="content_heading" align="left" colspan="2">Contact Us</td>
    </tr>
    <tr>
    <td valign="top">

    <table border="0" cellpadding="5" cellspacing="0">

    <form id="form" name="form" action="louis_inc/Email.php?sw=contactus" method="post">
    <tr>
    <td align="left" valign="middle"> </td>
    <td align="left"> </td>
    </tr>

    <tr>
    <td width="26%" align="left" valign="middle" class="text">First Name: </td>
    <td width="74%" align="left"><input type="text" name="fname" id="fname" value="" size="38" /></td>
    </tr>
    <tr>
    <td align="left" valign="middle" class="text">Last Name: </td>
    <td align="left"><input type="text" name="lname" id="lname" value="" size="38" /></td>
    </tr>
    <tr>
    <td align="left" valign="middle" class="text">Address:</td>
    <td align="left"><textarea name="address" cols="29" rows="2" id="address" value="" /></textarea></td>
    </tr>

    <tr>
    <td align="left" valign="middle" class="text">Email:</td>
    <td align="left"><input type="text" name="email" id="email" value="" size="38" /></td>
    </tr>
    <tr>
    <td align="left" valign="middle" class="text">Phone:</td>
    <td align="left"><input type="text" name="phone" id="phone" value="" size="38" /></td>
    </tr>
    <tr>
    <td align="left" valign="middle" class="text">Comments:</td>
    <td align="left"><textarea name="comments" cols="29" rows="4" id="comments" />
    </textarea> </td>
    </tr>
    <tr>
    <td align="left" class="text">Security Image: </td>
    <td align="left"><img src="img.php?size=6" alt="" /></td>
    </tr>
    <tr class="text">
    <td colspan="2" align="left" >Type the code shown on the image above: (case sensitive)</td>
    </tr>
    <tr>
    <td class="text"> </td>
    <td align="left" valign="top"><input type="text" name="security" class="formelements" id="security" value="" />
    </td>
    </tr>
    <tr>
    <td class="text"> </td>
    <td align="left"> </td>
    </tr>
    <tr>
    <td class="text"> </td>
    <td align="left"><input name="submit" type="submit" class="button" onclick="return ValiDate2(form)" value="Submit" />
    <input name="reset" type="reset" class="button" onclick="Clear(form)" value="Clear" /></td>
    </tr>
    <script type="text/javascript" src="louis_inc/lib/validate.js"></script>
    <script type="text/javascript">
    function ValiDate2(form)
    {

    if(isEmpty(form.fname, "Please Enter First Name")){return false}
    if(isEmpty(form.lname, "Please Enter Last Name")) {return false}

    if(isEmpty(form.address, "Please Enter Address")) {return false}
    if(isNotValidEmail(form.email, "Please Enter Valid Email")) {return false}
    if(isNotValidEmail(form.email2, "Please Enter Valid Email")) {return false}
    if(isNotSame(form.email2, "Please Enter Valid Email")) {return false}


    if(isEmpty(form.subject, "Please Enter subject")) {return false}
    if(isEmpty(form.message, "Please Enter message")) {return false}

    }
    </script>
    </form>


    Thanks again!
    Tagged:


Comments

  • Registered Users Posts: 9,141 ✭✭✭RobertFoster


    Your JavaScript and form elements are mismatched
    ...
    <textarea name="[b][u]comments[/u][/b]" cols="29" rows="4" id="[b][u]comments[/u][/b]" />
    ...
    if(isEmpty(form.[b][u]message[/u][/b], "Please Enter message")) {return false}
    ...
    

    Change one or the other. Note than the JS line is in the script twice (top and bottom), so you'd need to change both instances.


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    bigtiesto wrote: »
    Clients are elderly people who may not be able to get over the captcha. Is it possible that the form will send a blank e-mail when the captcha isn't entered correctly or at all?
    If you think that the elderly clients could be having trouble with the captcha, would you consider disabling it?


  • Closed Accounts Posts: 2 bigtiesto


    Thank you so much guys. I made the mods, including removing the captcha.

    We'll see how it works now.

    Have a great day!


Advertisement