Quick Contact Form Without a Plugin
-
Hi I am very stuck at the minute. I want to add a 3 field form to a section of my index.php page. I do not want to use a plugin. Just want to set the 3 fields in a form and have them processed by php as you would with any other form.
Problem is when I add the <form>Data Here</form> information into the div on the index.php page with the action=process.php and method=post etc.
I also created a page in the wordpress dashboard called process and published it. Then I set the default template to the page below
Then I create a file called process.php and I added the <?php /*Template Name: process page */ then I add the necessary php and save it to the theme folder in the same area as the index.php file.
Now I can see the form on the page and the necessary form fields. So in normal circumstances you would fill out the fields and hit the submit button. Then the form would look for the process.php page to process the information and sent the email.
But when I hit the submit button all I get is an Error 404 Page Not Found.
The text fields do not even refresh. So my questions are:
Question 1. What am I doing wrong?
Question 2: How do I do it right?
This form is just to collect the customers name and email address – mail it to myself using the mail($to, $subject, etc etc) so that we can contact them back and arrange a time for a consultation.
You can view the page here http://www.kitchens4u.ie – I am frustrated at this point in time and all help would be gratefully received.
Cheers
vinsprinter
- The topic ‘Quick Contact Form Without a Plugin’ is closed to new replies.