rocket / forms
Forms creation made easy
Installs: 18
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
pkg:composer/rocket/forms
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.