zhanif
zhanif

Reputation: 11

Whats wrong with my contact form?

Could someone please take a look at my website's code and tell me why my contact form isnt working?

Here are the relevant portions of code:

From the contact.html file:

<h3 class="indent-bot2">Contact Form</h3>
    <form action="#" id="contact-form">
        <div class="success"> Contact form submitted!<br>
            <strong>We will be in touch soon.</strong> </div>
            <fieldset>
                <label class="name">
                <input type="text" value="Enter Your Name:">
                <span class="error">*This is not a valid name.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="email">
                <input type="text" value="Enter Your E-mail:">
                <span class="error">*This is not a valid email address.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="phone">
                <input type="tel" value="Enter Your Phone:">
                <span class="error">*This is not a valid phone number.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="message">
                <textarea>Enter Your Message:</textarea>
                <span class="error">*The message is too short.</span> 
                <span class="empty">*This field is required.</span> </label>
                <div class="buttons-wrapper">
                    <a class="button" data-type="reset">Clear</a>
                    <a class="button" data-type="submit">Send</a>                          
                </div>                                          
            </fieldset>
    </form>

Also from the contact.html file:

<script type="text/javascript">
    $(window).load(function(){
        $('.slider')._TMS({
            duration:800,
            easing:'easeInCirc',
            preset:'zabor',
            pagination:false,
            slideshow:7000,
            banners:'fromTop',
            nextBu:'.next',
            prevBu:'.prev',
            waitBannerAnimation:false,
            pauseOnHover:true,
            beforeAnimation:function(){
                $('.slider .prev')
                .stop()
                .animate({top:'425px'},300,'easeOutCirc')
                $('.slider .next')
                .stop()
                .animate({top:'425px'},300,'easeOutCirc')
            },
            afterAnimation:function(){
                $('.slider .prev')
                .css({top:'425px'})
                .stop()
                .animate({top:'327px'},300,'easeOutCirc')

                $('.slider .next')
                .css({top:'425px'})
                .stop()
                .animate({top:'327px'},300,'easeOutCirc')
            }
        })

        $('#contact-form').forms({
            ownerEmail:'[email protected]'
        })

    });
    </script>

I think this is the piece of code that links to a javascript file which in turn calls "mailhandler.php".

Upvotes: 1

Views: 399

Answers (2)

SwatiKothari
SwatiKothari

Reputation: 381

<form action="some script"  METHOD="POST"   ENCTYPE="multipart/form-data"></form>

action="php or asp or pl script for processing form"

Upvotes: 3

user1914292
user1914292

Reputation: 1556

You didn't specify where the form should post to - what is the name of the script that you want to post this form to?

Now it says:

form action="#"

And it should say something like:

form action="contact.php"

Upvotes: 0

Related Questions