Help regarding Contact Form - Beginner Question

Hi,

I am new to php.
In my html page there is a #contactform as :

[code]








Enter your message



Submit
[/code]

I have shortened by removing classes. Here the submit link is submitContactForm();

function submitContactForm() { $.post('plugins/contactForm/contactForm.php',$('#contactForm').serialize(),submitContactFormResponse,'json'); }

There are other files associated with it. A php file also. I am putting it here as the message is getting lengthy.

I don’t know how to make it working, because when I click on Submit button of the form — Nothing happens. It stays there.

I just running the html document, by double clicking and it opens up in Firefox. Do I need some php executor or something like that to make the form working?

Please help.
I will post the other codes that I see related to the form.

Thanks.

Hi there,

You said that you are a beginner? But it seems that you are using jquery to perform the form post. The code doesn’t seem so beginner to me. If you’ve just copied it somewhere, i suggest that you use a beginner way to submit your form and work your way from there. So in your example, your submitContactForm function should be just this:

function submitContactForm()
{
document.contactForm.submit();
}

just take note that you need to specify where your form needs to be submitted to. You need to specify that in the forms action attribute. If you leave it empty, you’ll be submitting the form to this same page.

Hi,

Thanks for your reply.

I am beginner man, I have bought this one page web-site supposed to work as landing page for a product.

It has the inbuilt form, a folder plugins with Plugins directory in it.
It has the phpmailer and ContactForm directories in the plugins diretory.
And, a total of 10 files in these two folders
(php + .js (javascript or jquery, i don’t know that) + functions.js (used in newsletter and contactform files))

This is COMPLICATED. I just know basics of html and can change text.

Can you tell me what does it mean by posting the form on the same page or some other page?
I thought it is just to send the details to me via e-mail.

I’m afraid for being such a noob.

Thanks, for all the help and your time.

Sorry, I forgot to mention it in previous post that meanwhile the author of the template also replied few hours ago.
He told the form will be working when the page will be uploaded to server.

Sponsor our Newsletter | Privacy Policy | Terms of Service