2017 © Pedro Peláez
 

library lib-form

Form library of the Ride framework

image

ride/lib-form

Form library of the Ride framework

  • Wednesday, November 29, 2017
  • by ride-user
  • Repository
  • 7 Watchers
  • 0 Stars
  • 4,213 Installations
  • PHP
  • 21 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 80 Versions
  • 2 % Grown

The README.md

Ride: Form Library

Form library of the PHP Ride framework., (*1)

What's In This Library

RowFactory

The RowFactory interface is used to create a Row based on a simple name. Using this factory adds flexibility to the forms since every row can be overwritten with another implementation if needed., (*2)

A default implementation is provided by the GenericRowFactory class., (*3)

Row

The Row interface is used to implement a row type. This can be a scalar type like a string, a number, ... all generic HTML form elements. It can also be a component or a collection of components., (*4)

The following rows are provided by this library:, (*5)

  • button
  • collection
  • component
  • date
  • email
  • file
  • hidden
  • image
  • label
  • number
  • object
  • option
  • password
  • select
  • string
  • text
  • time
  • website
  • wysiwyg

Component

The Component interface is used to group a combination of rows into a single row or form. For example, a datetime component can combine a date row and a time row together into a single row. Creating components will add reusability to your forms., (*6)

Widget

The Widget interface is used to display a Row. Certain rows can have the same logic but a different view representation. Think about an option row which can be represented through a list of checkboxes (or radio buttons) or a select field., (*7)

View

The View interface is used to send the form to the UI. It removes everything needed to build the form and makes sure the form is serializeable., (*8)

Code Sample

Check this code sample to see some possibilities of this library:, (*9)

<?php

function createForm(Form $form) {
    // id of the form
    $form->setId('form-example');
    // action to catch submission of different forms on one page
    $form->setAction('submit-example');

    $form->addRow('name', 'string', array(
        'label' => 'Name',
        'description' => 'Enter your name',
        'filters' => array(
            'trim' => array(),
        ), 
        'validators' => array(
            'required' => array(),
        ),
    ));
    $form->addRow('gender', 'option', array(
        'label' => 'Gender',
        'description' => 'Select your gender',
        'default' => 'F',
        'options' => array(
            'F' => 'Female',
            'M' => 'Male',
            'O' => 'Other', 
        ),
        'validators' => array(
            'required' => array(),
        ),
    ));
    $form->addRow('extra', 'string', array(
        'label' => 'Extra',
        'description' => 'Extra row to show off some other options',
        'multiple' => true,
        'disabled' => false,
        'readonly' => false,
        'attributes' => array(
            'data-extra' => 'An extra attribute for the HTML element',
        ),
    ));

    return $form->build();
}

Installation

You can use Composer to install this library., (*10)

composer require ride/app-form

The Versions

29/11 2017

dev-master

9999999-dev

Form library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

29/11 2017

dev-develop

dev-develop

Form library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

29/11 2017
20/02 2017
20/01 2017
04/11 2016
13/10 2016
08/09 2016
29/08 2016
19/07 2016
14/07 2016
25/05 2016
21/01 2016
03/12 2015
20/08 2015
19/08 2015
05/08 2015
29/05 2015
06/05 2015
29/04 2015
03/03 2015
03/03 2015
26/02 2015
20/02 2015
12/02 2015
22/12 2014
15/12 2014
09/12 2014
04/12 2014
02/12 2014
27/11 2014
26/11 2014
16/10 2014
25/09 2014
24/09 2014
08/08 2014
29/07 2014
23/07 2014
11/07 2014
11/06 2014
11/06 2014
11/06 2014
10/06 2014
06/06 2014
03/06 2014
21/05 2014
06/05 2014
04/05 2014
24/04 2014
11/04 2014
10/04 2014
09/04 2014
08/04 2014
04/04 2014
26/02 2014
24/02 2014
23/02 2014
19/02 2014
13/02 2014
13/02 2014
13/02 2014
12/02 2014

0.6.1

0.6.1.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

12/02 2014

0.6.0

0.6.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

07/02 2014

0.5.7

0.5.7.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

07/02 2014

0.5.6

0.5.6.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

06/02 2014

0.5.5

0.5.5.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

06/02 2014

0.5.4

0.5.4.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

31/01 2014

0.5.3

0.5.3.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

31/01 2014

0.5.2

0.5.2.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

30/01 2014

0.5.1

0.5.1.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

29/01 2014

0.5.0

0.5.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

24/01 2014

0.4.3

0.4.3.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

22/01 2014

0.4.2

0.4.2.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

21/01 2014

0.4.1

0.4.1.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

11/01 2014

0.4.0

0.4.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

27/12 2013

0.3.0

0.3.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

16/12 2013

0.2.0

0.2.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

12/12 2013

0.1.2

0.1.2.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

01/12 2013

0.1.1

0.1.1.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

29/11 2013

0.1.0

0.1.0.0

Form library of the Pallo framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd