rocket/forms

dev-master / 1.0.x-dev 2016-01-02 17:58 UTC

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

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.