-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f0240b
commit 63b61f6
Showing
1 changed file
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,69 @@ | ||
Ajax Contact Form | ||
======================= | ||
# Ajax Contact Form | ||
|
||
A Simple Ajax Contact Form developed in PHP with HTML5 Form validation. Has a fallback in jQuery for browsers that do not support HTML5 form validation. | ||
A Simple Ajax Contact Form developed in PHP with HTML5 Form validation and pure JavaScript. | ||
|
||
## Demo | ||
|
||
View [demo here](http://www.pinceladasdaweb.com.br/blog/uploads/ajax-contact-form/). | ||
|
||
## Download | ||
|
||
You can download the latest version or checkout all the releases [here](https://github.com/pinceladasdaweb/Ajax-Contact-Form/releases). | ||
|
||
## Requirements | ||
|
||
* PHP >=5.3 | ||
|
||
## How to use? | ||
|
||
Open the config.php [`config.php`](contact-form/config/config.php) file and fill with your informations. | ||
|
||
Open the archive [`process.php`](process.php) and set the sender's email in the following variable: | ||
```php | ||
$emailTo = '<YOUR_EMAIL_HERE>'; | ||
<?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' | ||
] | ||
]; | ||
``` | ||
|
||
See the online form [here](http://www.pinceladasdaweb.com.br/blog/uploads/ajax-contact-form/) | ||
## Browser Support | ||
|
||
![IE](https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_48x48.png) | ||
--- | --- | --- | --- | --- | | ||
IE 9+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | | ||
|
||
## Contributing | ||
|
||
Check [CONTRIBUTING.md](CONTRIBUTING.md) for more information. | ||
|
||
## History | ||
|
||
Check [Releases](https://github.com/pinceladasdaweb/Simple-PHP-Contact-Form/releases) for detailed changelog. | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |