2017 © Pedro Peláez
 

library form-builder

Object Oriented Form Builder

image

geggleto/form-builder

Object Oriented Form Builder

  • Thursday, March 9, 2017
  • by geggleto
  • Repository
  • 1 Watchers
  • 4 Stars
  • 2,318 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Html Form Builder

Make HTML Forms, Easy., (*1)

Factories

  • Bootstrap 3

But if you want to use something else feel free to build and PR it., (*2)

Why?

Decouple your UI from flavour of the month CSS frameworks., (*3)

How?

Have a new favourite CSS framework? Write your own Factory!, (*4)

Csv Parser

$builder = new Builder(new Factory()); //default is Bootstrap 3
$root = $builder->build((new CsvParser())->parseSchemaCsvToArray("form.csv"), "Login");
$builder->write($rootElement, './userLoginForm.php');

Json Parser

$builder = new Builder(new Factory()); //default is Bootstrap 3
$root = $builder->build((new JsonParser())->parseSchemaCsvToArray("form.json"), "Login");
$builder->write($rootElement, './userLoginForm.php');

Procedural

$builder = new Builder(new Factory()); //default is Bootstrap 3

$schema = []; 

$schema[] = $builder->getSchemaForColumn('username')
    ->setPlaceholder('Username');
    ->setType('text');

$schema[] = $builder->getSchemaForColumn('password')
    ->setPlaceholder('Password');
    ->setType('password');

$schema[] = $builder->getSchemaForColumn('domain')
    ->setPlaceholder('Password');
    ->setType('select')
    ->setOptions([
        "example.com" => 1,
        "beta.example.com" => 2,
        "theta.example.com" => 3,
    ]);

$rootElement = $builder->build($schema, 'Login');

$builder->write($rootElement, './userLoginForm.php');

The Versions

09/03 2017

dev-master

9999999-dev

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

09/03 2017

2.1.2

2.1.2.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

09/03 2017

2.1.1

2.1.1.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

30/09 2016

2.1.0

2.1.0.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

14/09 2016

2.0.1

2.0.1.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

14/09 2016

2.0.0

2.0.0.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires

13/09 2016

1.0.0

1.0.0.0

Object Oriented Form Builder

  Sources   Download

MIT

The Development Requires