PHPackages                             ttskch/contact-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. ttskch/contact-form

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ttskch/contact-form
===================

PHP utility classes to implement general contact form

2.0.1(6y ago)065[1 issues](https://github.com/ttskch/contact-form/issues)MITPHPPHP &gt;=5.4.0

Since Oct 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ttskch/contact-form)[ Packagist](https://packagist.org/packages/ttskch/contact-form)[ Docs](https://github.com/ttskch/contact-form)[ RSS](/packages/ttskch-contact-form/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

contact-form
============

[](#contact-form)

[![Travis (.com) branch](https://camo.githubusercontent.com/bbf510d118eddd5f20cf4e7ae76e4ce99b758a663458a3b20e641eea8cd7b406/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f7474736b63682f636f6e746163742d666f726d2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/ttskch/contact-form)[![Latest Stable Version](https://camo.githubusercontent.com/45bc20751d361fda65ddbf502b77b0e5de00f16b4a5678682b0b7ce864e62568/68747470733a2f2f706f7365722e707567782e6f72672f7474736b63682f636f6e746163742d666f726d2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/ttskch/contact-form)[![Total Downloads](https://camo.githubusercontent.com/db414e32a98ab1dfe49dc83617dc770a4a9ddd3d9143f35d6e95c46e88690f62/68747470733a2f2f706f7365722e707567782e6f72672f7474736b63682f636f6e746163742d666f726d2f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/ttskch/contact-form)

PHP utility classes to implement general contact form (also with confirmation view). It's maybe useful to build contact form on WordPress or pure PHP site.

Requirements
------------

[](#requirements)

- PHP 5.4+
- Configuring `date.timezone` in php.ini

Supported features
------------------

[](#supported-features)

- Csrf protection with session and hidden input tag
- Server side validation for submitted values
- **Short hands to print submitted value itself, validation errors, "selected" option, "checked" option**
- Attaching files and handle them easily in the same session
- Sending email which contains submissions information easily

Installation
------------

[](#installation)

```
$ composer require ttskch/contact-form
```

or

```
$ git clone git@github.com:ttskch/contact-form.git
$ cd contact-form
$ composer install --no-dev

# If your web site is not composer-friendly, upload whole "contact-form" directory by hand.
```

Usage
-----

[](#usage)

```
