Contact form: thank you state

This support request was posted in BBQ by akanekodani

Request ID #6262 Resolved
  • 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

    Hello 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,
    Juan

    Thanks 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

    Hi 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.

    Thanks for the quick reply, Juan.
    I will try to edit the javascript. Please give me the hint to that.
    thanks
    Akane

    Hi 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.

    Thanks Juan for the reply. I will try to change the code. If I have some issue, I will follow up in this post.
    thanks
    Akane

    Ok 🙂

    You have a nice day,
    Juan.

    Hi 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;

    Hi,

    Thank you for the follow up. Below this line:

    jQuery(“#node”).ajaxComplete(function(event, request, settings){
    

    Best,
    Juan.

    Thanks 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 21

    Fatal 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??

    Just following the last post. The place I overwrote was
    wp-content/bbq/includes/scripts.php

    Please help me to fix this issue.
    Thank you.

    Hello 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.

    Thanks 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

    Hello 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.

Viewing 15 posts - 1 through 15 (of 24 total)

This topic is marked as resolved

Only the topic author can re-open this thread.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server