Contact form success alert

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #10036608
    odessitka1961
    Participant

    I need your help with success alert when message was send



    Template Version: contact form
    #10036617
    Support
    Keymaster

    Hello,

    Did you receive the messages even without a success message ?

    If yes, first make sure you have the script js/views/view.contact.js included on footer of page:

    <script src="js/views/view.contact.js"></script>

    Make sure you have the variable $debug at php/contact-form.php defined as:

    $debug = 0;

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


    #10036624
    odessitka1961
    Participant

    Hi. Thanks for replying. Yes, I receive the message anyway. But my problem is different. I don’t need <script src=”js/views/view.contact.js”></script>. I am quite happy with “view.home.js”. My problem is that after I submit the message it’s take me to a blank page with alert {“response”:”success”}. I need the message would display on the same page like on page “contact-us-advanced.php”. Success with green background Error with red background. Is it posible?

    Or if use “view.contact.js”, how I can link it to “Thanks page”?


    #10036630
    Support
    Keymaster

    Hello,

    The purpose of view.contact.js is exactly what you need, that’s show a success message without reload the page with blank “success”.

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


    #10036639
    odessitka1961
    Participant

    Hi.
    With “view.contact.js” after I send message from advanced contact form the alert is on the same page with green background saying that message was sent. But, if I send message using contact form in footer It takes me on “Page 404″, saying:

    ” Not Found
    The requested URL was not found on this server.

    Apache/2.4.46 (Win64) PHP/7.3.21 Server at mytailoredwebsite Port 8081″

    As a server I am using localhost “wamp64”. My Website isn’t life yet (I am preparing to do it within the next week or so). I am getting messages on my email address from the website in both cases (from advance-form and just normal contact form).


    #10036651
    Support
    Keymaster

    Hello,

    In this case please share with us all code of the follow pages/files:
    – The contact form page
    – php/contact-form.php (probably the footer contact form is running truogh this file)
    – js/views/view.contact.js

    Would be great if you can publish the website in your server with a http://www.yourdoman.com/test and send for us, so we can inspect the code and discover what’s happening. Even so please share the above pages/files code.

    You can send these codes with a server like https://pastebin.com, you will create a link with the code and share the link with us.

    Kind Regards,

    Rodrigo.

    If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


    #10036654
    odessitka1961
    Participant

    Please let me know if you received my reply with codes.


    #10036656
    odessitka1961
    Participant

    You are asking me to publish my website with http://www.yourdoman.com/test, but my website isn’t ready to be published yet. And I am setting up a different server.
    I don’t understand what do you mean
    “Would be great if you can publish the website in your server with a http://www.yourdoman.com/test and send for us, so we can inspect the code and discover what’s happening. Even so please share the above pages/files code.”


    #10036658
    odessitka1961
    Participant

    I can see that you are not getting my code for the files you were asking for. And I don’t know how I can send it to you.


    #10036659
    odessitka1961
    Participant

    I Think I understood.
    Here is my code for contact us php page
    https://pastebin.com/D8mWLkyi


    #10036660
    odessitka1961
    Participant

    Here is a code for php/contact-form.php

    https://pastebin.com/rcWnpP74


    #10036661
    odessitka1961
    Participant

    And finally here is code for js/views/view.contact.js
    https://pastebin.com/XrAV3ALc


    #10036666
    Support
    Keymaster
    This reply has been marked as private.
    #10036668
    odessitka1961
    Participant

    Ok. Try this one:
    https://pastebin.com/k6FxivN1
    This is for contact-form.php


    #10036669
    odessitka1961
    Participant

    And this one for “view.contactjs:
    https://pastebin.com/Qi71rbbH


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

This topic is marked as "RESOLVED" and can not rceive new replies.