Skip to content
A simple Ajax Contact Form developed in PHP with HTML5 Form validation and pure JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Add support classes Jun 4, 2016
public/js Remove unsafe headers Nov 11, 2016
vendor Added method to set Sender Email Nov 19, 2016
.gitignore Added .gitignore Jun 4, 2016
CONTRIBUTING.md Added Contributing guide Jun 4, 2016
LICENSE Initial commit Sep 15, 2014
README.md Update Readme Jun 4, 2016
index.php
process.php Added method to set Sender Email Nov 19, 2016

README.md

Ajax Contact Form

A Simple Ajax Contact Form developed in PHP with HTML5 Form validation and pure JavaScript.

Demo

View demo here.

Download

You can download the latest version or checkout all the releases here.

Requirements

  • PHP >=5.3

How to use?

Open the config.php config.php file and fill with your informations.

<?php

return [
    'subject' => [
        'prefix' => '[Contact Form]'
    ],
    'emails' => [
        'to'   => '', // Email to receive emails via the form.
        'from' => ''  // A valid email where the domain should be the same when the form is hosted.
    ],
    'messages' => [
        'error'   => 'There was an error sending, please try again later.',
        'success' => 'Your message has been sent successfully.',
        'validation' => [
            'emptyname'    => 'Name is required.',
            'emptyemail'   => 'Email is invalid.',
            'emptysubject' => 'Subject is required.',
            'emptymessage' => 'Message is required.'
        ]
    ],
    'fields' => [
        'name'     => 'Name',
        'email'    => 'Email',
        'phone'    => 'Phone',
        'subject'  => 'Subject',
        'message'  => 'Message',
        'btn-send' => 'Send'
    ]
];

Browser Support

IE Chrome Firefox Opera Safari
IE 9+ ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔

Contributing

Check CONTRIBUTING.md for more information.

History

Check Releases for detailed changelog.

License

MIT

You can’t perform that action at this time.