Jul 30th, 2009, 10:53 AM
First off many thanks to Ben for this script, I've used it before and it makes a beautiful form management tool. I've also recommended it to numerous clients.
This may be a very simple question... and then again this may be impossible given FT's intended purpose.
We are setting up a contact information page on our site here:
michaelaustinproductions.com/contact-us
I've had it working, however we would like to do away with the page change to a static thank you page and simply use an AJAX call to replace the form with a thank you message, keeping the user on the page.
The variables in dataString are set to the value of the input boxes, I also originally set the url: to direct simply to the process.php(note the curly braces are edited in, I assure you that the path is correct in the code), and passed data: dataString separately. While setting up the form, the script does not recognize that values are being passed.
I understand this may be far outside the realm of the script, if it is just let me know, and if you know anywhere to get some additional information on the topic that would be greatly appreciated, however google and a search on this site yielded nothing that I could find.
Thank you again for the amazing script, and any help that anyone could provide would be an extreme help.
-Jason
This may be a very simple question... and then again this may be impossible given FT's intended purpose.
We are setting up a contact information page on our site here:
michaelaustinproductions.com/contact-us
I've had it working, however we would like to do away with the page change to a static thank you page and simply use an AJAX call to replace the form with a thank you message, keeping the user on the page.
Code:
var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&company' + company + '&message' + message;
$.ajax({
type: "POST",
url: "{path to}/process.php?" + "form_tools_initialize_form=1&form_tools_form_id=3&" + dataString,
success: function() {
$('#contact_form_wrap').html("<div id='message'></div>");
$('#message').html("<h2>Contact Form Submitted!</h2>")
.append("<p>We will be in touch soon.</p>")
.hide()
.fadeIn(1500, function() {
$('#message').append("<img id='checkmark' src='images/check.png' />");
});
}
});
The variables in dataString are set to the value of the input boxes, I also originally set the url: to direct simply to the process.php(note the curly braces are edited in, I assure you that the path is correct in the code), and passed data: dataString separately. While setting up the form, the script does not recognize that values are being passed.
I understand this may be far outside the realm of the script, if it is just let me know, and if you know anywhere to get some additional information on the topic that would be greatly appreciated, however google and a search on this site yielded nothing that I could find.
Thank you again for the amazing script, and any help that anyone could provide would be an extreme help.
-Jason