Download the PHP package zored/reverse-form without Composer
On this page you can find all versions of the php package zored/reverse-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package reverse-form
ReverseForm
This is an early alpha, things do work but may be changed how they work in future.
Uni-Form form demo at: http://reverseform.modo.si/form/test-uniform
Twitter Bootstrap form demo at: http://reverseform.modo.si/form/test-bootstrap
Introduction
ReverseForm is a form rendering module. It creates the renderer objects through a view helper. It also provides an object which extends Zend\Form\Element called ReverseForm\ExtendedElement which will be usefull to create more complicated elements faster.
Goals
- Support other frameworks for rendering forms like mobile ones.
- Add an unified way of creating new elements. It should take care of the JS, CSS and configuration part of an element.
- Elements should honor localization.
Installation with Composer
-
Add this project in your
composer.json
: -
Fetch the repository with composer:
- Enable it in your
config/application.config.php
file:
Form Renderers
Currently I provide 2 types of renderers, but it is simple to create other renderers by
extending the ReverseForm\Renderer. Before you start take a look at the /config/module.config.php
all of the options are there.
- ReverseForm\Renderer\Uniform renders the form with extra markup to make it work with Uni-Form.
- ReverseForm\Renderer\Bootstrap obviously renders Twitter Bootstrap.
Uniform Renderer
Get your css from Uni-Form. Check the path to load the files in the module_config.php.
Bootstrap Renderer
It does not auto load any css or js files in to your view. If you need to load extra files you can do it from the configuration.
Usage
In your view script do:
In your action do:
You would do it better
Feel free to improve it. Will merge them in to the project and thank you.
TODO
- Many element view scripts look the same, only difference is the js part. Refactor all same looking elements in to one viewscript. COMPLETED.
- Write some decent documentation.
- Demo module is on it's way.
- Figure out fieldset templates current way is too ugly