-1

Having trouble with posting the code's. I hope this is better? I have a contact form that after filling out and clicking send, it doesn't clear the form, you can just keep clicking send and it keeps on sending.

if (isset($_POST['submit'])) {
user1
  • 39
  • 1
  • 8

2 Answers2

1

you can do this with jquery

jQuery(document).ready(function($){

// on submit...
$("#contactForm #submit").click(function() {
    $("#error").hide();

(...here your setting..)

function success(){
        $("#sent-form-msg").fadeIn();
        $("#contactForm").fadeOut();
     }

    return false;
});

and add this script to your html form :

            <!-- form -->
            <script type="text/javascript" src="link of script"></script>

i hope that help you

-3

As I see in the end you send a mail, I belive you must after that reload the page so the form apear with no data in it.

malaquias
  • 65
  • 1
  • 1
  • 9
  • Please post a complete answer with code. Though, at this time you're guessing because we don't have enough information to answer the question. Not good because now it looks, in the list of questions, like the question has an answer. – Popnoodles May 31 '14 at 14:47