On my website I have a reservation form. Once someone clicks submit a confirmation number comes up (that number is different everytime). I get an e-mail with everything the person filled out
on my reservation form but I want to know their confirmation number as well.
RANDOM NUMBER CODE
$(document).ready(function() {
var ranval = Math.floor((Math.random()*10000)+1);
$('input[name=lblrand]').val(ranval);
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
alert("Your Message has been sent!Your Form Registration Number is: "+ ranval);
$('#myForm').resetForm();
WHAT GETS E-MAILED TO ME
$('#rSubmit').click(function(){
var data = {};
data.to = "
[email protected]";
data.from = "
[email protected]>";
data.subject = "New Reservation";
data.message = "New Reservation from Website \n"+
'\n First Name : '+$('#name').val()+
'\n Last Name : '+$('#lastname').val() +
'\n Confirmation : '+$('#lblrand').val () +
'\n Coupon Code : '+$('#coupon').val() +
'\n Company Name : '+$('#company').val() +
'\n Phone Number : '+$('#phone').val() +
'\n Street Address : '+$('#street').val() +
'\n Pick-Up City : '+$('#city').val()+
'\n Pick-Up State : '+$('#state').val() +
'\n Pick-Up Zip : '+$('#zip').val() +
'\n Date : '+$('#calendar').val()+
'\n Time : '+$('#time').val() +
'\n Time : '+$('#time2').val() +
'\n Time : '+$('#time3').val() +
'\n Airport : '+$('#airport').val() +
'\n Airline : '+$('#airline').val() +
'\n Flight # : '+$('#fnumber').val() +
'\n Stops : '+$('#hstops').val() +
'\n Stops Info : '+$('#info').val() +
'\n Passengers : '+$('#passengers').val() +
'\n Luggages : '+$('#luggages').val()+
'\n Car Seat : '+$('#seat').val()+
'\n Drop-Off Street : '+$('#dostreet').val() +
'\n Drop-Off City : '+$('#docity').val()+
'\n Drop-Off State : '+$('#dostate').val() +
'\n Drop-Off Zip : '+$('#dozip').val() +
'\n D.O Airport : '+$('#doairport').val() +
'\n D.O Airline : '+$('#doairline').val() +
'\n Flight # : '+$('#dofnumber').val() +
'\n Date : '+$('#calendar2').val()+
'\n Time : '+$('#rtime').val() +
'\n Time : '+$('#rtime2').val() +
'\n Time : '+$('#rtime3').val() +
'\n Return Street : '+$('#rtstreet').val() +
'\n Return City : '+$('#rtcity').val()+
'\n Return State : '+$('#rtstate').val() +
'\n Return Zip : '+$('#rtzip').val() +
'\n Return Airport : '+$('#rtairport').val() +
'\n Return Airline : '+$('#rtairline').val() +
'\n Return Flight # : '+$('#rtfnumber').val() +
'\n Payment Type : '+$('#payment').val() +
'\n Card Number : '+$('#creditcardno').val() +
'\n Exp. Date : '+$('#expirydate').val() +
'\n Exp. Date : '+$('#expirydate2').val()
;
Also, if there is a way when this information gets e-mailed to me if I can put it in a table so it could come up more organized.
Any help, tips, advice is appreciated.
ALSO, check out my website and the form for yourself at http://www.greatlimoservice.com