rocket / forms
This package is abandoned and no longer maintained.
No replacement package was suggested.
Forms creation made easy
dev-master / 1.0.x-dev
2016-01-02 17:58 UTC
Requires
- php: >=5.5.0
- rocket/script: ~1.0.0
Suggests
- illuminate/support: To use with Laravel
- twig/twig: To use the forms twig extension
This package is auto-updated.
Last update: 2023-08-16 18:38:37 UTC
README
Wrapper around form creation, also handles putting the value of a sent form, default values, and adding classes for errors.
The markup is made for Twitter Bootstrap version 3
Install
Via Composer
$ composer require rocket/forms
Usage
PHP
echo Forms::email('email', 'Adresse E-mail')->width(6); echo Forms::password('password', 'Mot de passe')->width(6); echo Forms::checkbox('remember', 'Se souvenir de moi')->width(6);
Blade
{{ Forms::email('email', 'Adresse E-mail')->width(6) }}
{{ Forms::password('password', 'Mot de passe')->width(6) }}
{{ Forms::checkbox('remember', 'Se souvenir de moi')->width(6) }}
Twig
With the twig extension, it is very easy to create form fields with a fluid syntax
{% form 'email' 'Adresse E-mail' 'email' width(6) %}
{% form 'password' 'Mot de passe' 'password' width(6) %}
{% form 'remember' 'Se souvenir de moi' 'checkbox' width(6) %}
Testing
All the tests live in the main project.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.