Installation
[Composer], (*1)
Add the following to composer.json
, (*2)
"require": {
"gilleswittenberg/contact-form": "dev-master"
}
[Manual], (*3)
- Download http://github.com/gilleswittenberg/CakePHP_ContactForm/zipball/master
- Unzip the downloaded ZIP file.
- Copy the resulting folder to
APP_DIR/Plugin
- Rename the folder you just copied to
ContactForm
[GIT Submodule], (*4)
In your APP_DIR
type:, (*5)
git submodule add git://github.com/gilleswittenberg/CakePHP_ContactForm.git Plugin/ContactForm
git submodule init
git submodule update
[GIT Clone], (*6)
In APP_DIR/Plugin
directory type, (*7)
git clone git://github.com/gilleswittenberg/CakePHP_ContactForm.git ContactForm
Create schema
Run cake shell schema, (*8)
cake schema create --plugin ContactForm
Usage
In APP_DIR/Config/bootstrap.php
add:, (*9)
CakePlugin::load('ContactForm', array('bootstrap' => true, 'routes' => true));
Configure::write('ContactForm', array(
'mailTo' => 'mail@example.com',
'sendInControllerAction' => 'true'
));
ToDo
- Configurable validation for fields
- Configurable flash messages
- SendMailShell
- Captcha
- Clear Session from send mail
- Disable form after submit (Javascript)
- Allow for multiple different forms per application