Results 1 to 1 of 1

Thread: Help with an auto responder form

  1. #1
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with an auto responder form

    Hi guys i need help, i recently downloaded this free Ajax auto responder contact form, my knowledge with php and java script is quite basic.
    the form can be found at the link below
    http://ramui.com/documentation/ajax-...responder.html
    I added fields to the contact form, the form works well. however when you test the contact form, an email is sent to my email address, that all works fine. However i dont receive the information for the fields that i have added to the contact form in the email that i receive. all that appears is the IP address/Date/Message and sender email address.
    Im assuming i need to tweak the code in one of the files. I think the file called mail.js is where i need to fiddle around with.
    Could someone help? the code is below

    Code:
    function validateForm(max){
    var errors='';
    var str=fw_trim(document.getElementById('fw_contact_name').value);
    if (str.length > 40){
    errors='Name must be within 40 characters.\n'; }
    if (str.length <3){
    errors='Write your name.\n'; }
    str=fw_trim(document.getElementById('fw_contact_message').value);
    if (str.length > max){
    errors+='Please enter your Phone Number'+max+'characters.\n'; }
    if (str.length <7){
    errors+='Enter you phone number.\n'; }
    str=fw_trim(document.getElementById('fw_contact_subject').value);
    if (str.length > 78){
    errors+='Subject length must be within 78 characters.\n'; }
    str=fw_trim(document.getElementById('fw_contact_address').value);
    if (str.length > 78){
    errors+='Please enter your Address.\n'; }
    str=fw_trim(document.getElementById('fw_contact_from').value);
    if (!((str.indexOf(".") > 0) && (str.indexOf("@") > 0)&&(str.length < 100))){
    errors+='Enter correct email id\n'; }
    var code = parseInt(document.getElementById('fw_contact_captcha').value);
     if ((code < 1000) || (code > 9999) || isNaN(code)) {
    errors+='Enter correct varification code\n'; }
    if (errors){
    alert('The following error(s) occurred:\n'+errors);
    return false;}
    return true;
    }
    function fw_mail(){
    if(validateForm(3000)){
    var url = "mail/index.php?sendmail=true";
    var params = "name=" + fw_total_encode(document.getElementById('fw_contact_name').value) + "&from=" +fw_total_encode(document.getElementById('fw_contact_from').value) +"&subject=" + fw_total_encode(
    document.getElementById('fw_contact_subject').value) + "&message=" +fw_total_encode(document.getElementById('fw_contact_message').value) + "&captcha_code=" + fw_total_encode(
    document.getElementById('fw_contact_captcha').value);
    var fw_connection=fw_connect(url,params);
    fw_connection.onreadystatechange = function(){
    if(fw_connection.readyState == 4 && fw_connection.status == 200){
    document.getElementById('feedback').innerHTML = fw_connection.responseText;}}}}
    Last edited by Snookerman; 08-17-2009 at 08:47 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •