2017 © Pedro Peláez
 

library uform

Full featured form library

image

gsouf/uform

Full featured form library

  • Tuesday, November 7, 2017
  • by sneakyBobito
  • Repository
  • 2 Watchers
  • 0 Stars
  • 136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 16 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

UForm

Latest Stable Version Build Status Test Coverage, (*1)

UForm is a form validation/filtering/rendering library for PHP., (*2)

Usage

Quick start


use UForm\Builder; $form = Builder::init("action", "POST") ->columnGroup() ->column(3, 12) ->text("firstname", "Firstname")->required()->stringLength(2, 20) ->text("lastname", "Lastname")->required()->stringLength(2, 20) ->close() ->column(3, 12) ->panel('Login Information') ->text("login", "Login")->required()->stringLength(2, 20) ->password("password", "Password")->required()->stringLength(2, 20) ->close() ->close() ->close() ->getForm(); //If it's a post request we validate the form with the post data if ($_SERVER['REQUEST_METHOD'] == "POST") { $formContext = $form->validate($form->getInputFromGlobals()); if ($formContext->isValid()) { $filteredData = $formContext->getData(); // Do some logic with data // ... } } else { // Or else we just generate a context with empty values $formContext = $form->generateContext([]); } // We want to render some html for bootstrap 3 $formRenderer = new Bootstrap3Render(); $html = $formRenderer->render($formContext); echo $html;

The above example will result in:, (*3)

Full documentation

The full documentation will available at gsouf.github.io/UForm once the project will be considered as stable, (*4)

The Versions

07/11 2017

dev-master

9999999-dev https://github.com/gsouf/UForm

Full featured form library

  Sources   Download

MIT

The Requires

 

The Development Requires

filter form bootstrap validation foundation

07/11 2017

0.1.0

0.1.0.0 https://github.com/gsouf/UForm

Full featured form library

  Sources   Download

MIT

The Requires

 

The Development Requires

filter form bootstrap validation foundation

06/12 2015

v0.0.4-beta

0.0.4.0-beta https://github.com/gsouf/UForm

Form library, flexible and concret including filtering/validation/render with Bootstrap and Foundation adapters

  Sources   Download

MIT

The Requires

 

The Development Requires

filter form bootstrap validation foundation

08/10 2015

dev-materialize

dev-materialize https://github.com/gsouf/UForm

Form library, flexible and concret including filtering/validation/render with Bootstrap and Foundation adapters

  Sources   Download

MIT

The Requires

 

The Development Requires

filter form bootstrap validation foundation

14/09 2015

v0.0.3

0.0.3.0

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

28/08 2014

v0.0.2-beta

0.0.2.0-beta

  Sources   Download

The Development Requires

04/07 2014

v0.0.1-alpha

0.0.1.0-alpha

  Sources   Download

The Development Requires