Contact form: thank you state
This support request was posted in BBQ by akanekodani
- akanekodani August 30, 2015 at 5:34 pm
When you post a contact form and click “submit”, it shows “THANK YOU FOR LEAVING A MESSAGE.” text under the contact copy. However, this message is not noticeable and customers hitting submit buttons many times. To prevent from that, is it possible to show only the message text once you submit the contact form? Please let me know how.
Thanks in advance.
Akane
Juanfra Aldasoro August 31, 2015 at 2:55 pmHello Akane,
Thank you for writing.
The success message (Thank you for leaving a message) is displayed only once the contact form is sent.
The thing that might be happening is that the visitor may be clicking the button over and over again.
Best,
Juanakanekodani August 31, 2015 at 4:36 pmThanks Juan for the reply. Yes, the visitor clicks the button over and over again because they don’t notice the success message in the contact form.
To make it clear, I’d like to take the contact form out and just show the success message (Thank you for leaving a message) ONLY in the contact form area. Is it possible to hide the form?thanks
Juanfra Aldasoro August 31, 2015 at 10:55 pmHi Akane,
Thank you for the follow up.
Unfortunately the only way to achieve that would be editing the javascript for the contact form. Do you feel comfortable with editing javascript? Perhaps we can give you a hint on how to change it.
Best,
Juan.akanekodani September 1, 2015 at 2:41 amThanks for the quick reply, Juan.
I will try to edit the javascript. Please give me the hint to that.
thanks
AkaneJuanfra Aldasoro September 1, 2015 at 9:15 pmHi Akane,
Ok, in the file /bbq/includes/scripts.php of the latest version of BBQ (to date, is 1.2.5), below the line number 216, you need to paste the following code:
jQuery('.nice-contact-form #nice_contact').hide();
Best,
Juan.akanekodani September 2, 2015 at 2:47 amThanks Juan for the reply. I will try to change the code. If I have some issue, I will follow up in this post.
thanks
Akaneakanekodani September 5, 2015 at 10:47 pmHi Juan.
I looked into the javascript. However, my BBQ version is 1.0.9 and it is slightly different from version 1.2.5. In my version, the line you gave could be in somewhere below. But I don’t know where exactly it needs to put in. Please kindly point me out where it needs to inset in: jQuery(‘.nice-contact-form #nice_contact’).hide();
Thanks so much in advance.——
if (! function_exists( ‘nice_contact_js’ )):function nice_contact_js()
{
// being here we can set admin-ajax.php for WP multisite
?>jQuery(document).ready(function($) {
jQuery(‘#nice_contact’).validate({
messages: {
“name”:{“required”:”Please enter your name.”},
“mail”:{“required”:”Please enter your email address.”},
“message”:{“required”:”Please enter a message.”}
},submitHandler: function(form) {
var str = jQuery(‘#nice_contact’).serialize();
jQuery.ajax({
type: “POST”,
url: “admin-ajax.php”,
data: ‘action=nice_contact_form&nonce=&’ + str,
success: function(msg) {
jQuery(“#node”).ajaxComplete(function(event, request, settings){
if(msg == ‘sent’) {
jQuery(“.nice-contact-form #node”).hide();
jQuery(“.nice-contact-form #success”).fadeIn(“slow”);
jQuery(“#nice_contact input[type=text], #nice_contact textarea”).val(“”);
}else {
result = msg;
jQuery(“.nice-contact-form #node”).html(result);
jQuery(“.nice-contact-form #node”).fadeIn(“slow”);
}
});
}
});
return false;
form.submit();
}
});
});<?php
}
endif;Juanfra Aldasoro September 7, 2015 at 5:41 pmHi,
Thank you for the follow up. Below this line:
jQuery(“#node”).ajaxComplete(function(event, request, settings){
Best,
Juan.akanekodani September 7, 2015 at 8:22 pmThanks Juan.
I aded the code, but when I overwrite the script.php. The site went down…
It shows this message.
Warning: require(/home/content/85/10368385/html/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/content/85/10368385/html/wp-settings.php on line 21Fatal error: require() [function.require]: Failed opening required ‘/home/content/85/10368385/html/wp-includes/load.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/85/10368385/html/wp-settings.php on line 21
What should I do??
akanekodani September 7, 2015 at 8:26 pmJust following the last post. The place I overwrote was
wp-content/bbq/includes/scripts.phpPlease help me to fix this issue.
Thank you.Juanfra Aldasoro September 7, 2015 at 10:22 pmHello Akane,
Thank you for the follow up. You just need to copy the code I sent you in the place I mentioned you. Please re-check that you are copying the exact same code with single quotations.
Connect to your site via FTP and get the file, modify it and upload it again.
Best,
Juan.akanekodani September 9, 2015 at 4:22 amThanks Juan for the follow up. Still facing the wordpress fatal error. I am trying to fix. Once it’s done, I will apply the code.
BTW, is it possible to upgrade BBQ theme to 1.2.5 version? If so, do we need to purchase the theme again?
And is it easy to transfer all custom codes to the new version?
Please advice.thanks
Juanfra Aldasoro September 9, 2015 at 1:59 pmHello Akana,
Did you make a backup of your files before making the change? If you had, please put that file.
Yes, it is possible to upgrade BBQ to 1.2.5. Where have you placed the custom code? Have you followed our recommendations? http://nicethemes.com/support/theme-docs/bbq/#custom-scripting
If your purchase has over a year, then you have to re-purchase to have a license for updates and extended support, you can purchase a new copy here: http://nicethemes.com/theme/bbq/
Best,
Juan.
This topic is marked as resolved
Only the topic author can re-open this thread.