comphppuebla / easy-forms
Easy forms processing
Installs: 4 045
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=5.5
- beberlei/assert: ~2.3
Requires (Dev)
- phpspec/phpspec: ~2.1
- phpunit/phpunit: ~4.4
- symfony/console: ~2.6
- symfony/filesystem: ~2.6
- symfony/security-csrf: ~2.6
- twig/twig: ~1.16
- zendframework/zend-captcha: ~2.3
- zendframework/zend-inputfilter: ~2.3
- zendframework/zendservice-recaptcha: ~2.0
Suggests
- symfony/console: To build your forms interactively through the console
- symfony/filesystem: To build your forms interactively through the console
- symfony/security-csrf: To protect forms against CSRF atacks
- twig/twig: To provide form rendering
- zendframework/zend-captcha: To use CAPTCHA images in forms
- zendframework/zend-inputfilter: For filtering and validation
- zendframework/zendservice-recaptcha: To use ReCAPTCHA elements in forms
This package is auto-updated.
Last update: 2024-12-27 09:38:39 UTC
README
This is a light library to process HTML forms in Web applications. Its main goal is to delegate concerns like, validation, rendering, translation, and dynamic modification/population to well-known components.
This package is intended to be used as a glue for packages that provide the following functionality.
- Rendering (Twig)
- Validation (Zend input filter)
- Special form elements like CSRF tokens (Symfony Security CSRF), and Captcha elements (Zend CAPTCHA).
All these dependencies are optional and more adapters can be added to provide the same functionality with other libraries.
The reason behind this package is that most popular PHP packages (like Symfony and Zend) require you to install several dependencies, like translation, validation, and event dispatching packages, even if you don't need to use them.
If you are already using a form component as part of its corresponding framework, you probably will not find this package very useful. This package is intended to be used when you need a simple integration and you don't need or want to install more packages than you already have.
Examples
You can find some working examples in a small Slim application in this repository.
Unit Tests
Setup the test suite using Composer:
$ composer install --dev
Run it using PHPUnit and PHPSpec:
$ php bin/phpunit --testdox && php bin/phpspec run
License
EasyForms
is released under the MIT License.
Documentation
For more details, please review the full documentation.