PHPackages                             ride/lib-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ride/lib-form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ride/lib-form
=============

Form library of the Ride framework

1.2.3(1y ago)06.4k19MITPHP

Since Nov 29Pushed 1y ago7 watchersCompare

[ Source](https://github.com/all-ride/ride-lib-form)[ Packagist](https://packagist.org/packages/ride/lib-form)[ RSS](/packages/ride-lib-form/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (87)Used By (19)

Ride: Form Library
==================

[](#ride-form-library)

Form library of the PHP Ride framework.

What's In This Library
----------------------

[](#whats-in-this-library)

### RowFactory

[](#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.

A default implementation is provided by the *GenericRowFactory* class.

### Row

[](#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.

The following rows are provided by this library:

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

### Component

[](#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.

### Widget

[](#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.

### View

[](#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.

Code Sample
-----------

[](#code-sample)

Check this code sample to see some possibilities of this library:

```
