Mama Mia’s Pizzeria Stage 5 – Coding Part 3

To finish up the main functions of the contact page I decided to go with a jQuery plug-in to perform the validation functions for my contact form, and I’ve used a php file to process the posted data.

Here is a screenshot of the contact form, it hasn’t changed since my last post.

 

contactscreenshot

The validation rules for the form are fairly simple. The first name and last name fields just need a minimum length of 1 character.

The email field should contain a valid email address.

contactscreenshot2

And the comment box should have a minimum of 100 characters.

contactscreenshot3

All fields in the form are also required before the form can be submitted.

contactscreenshot4contactscreenshot5

Once the form is successfully submitted an email containing the data will be received.

contactscreenshot6

There are still some stylistic changes that I would like to make, especially for the email that is sent. I also plan to use Ajax when processing the form so that I can display a success message directly on the page rather than using a pop up window. Another thing I would like to add is a confirmation email for the user. These changes will probably not take place until I’ve finished some more functionalities/pages for the site.

Of course you can still see the live version of the site [HERE]

and the Git Repo [HERE]

 

 

 

Leave a comment