2017 © Pedro Peláez
 

library form-former

HTML5 Form Creation Tool in PHP (7.1+)

image

it-all/form-former

HTML5 Form Creation Tool in PHP (7.1+)

  • Saturday, July 28, 2018
  • by it-all
  • Repository
  • 2 Watchers
  • 2 Stars
  • 61 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 13 % Grown

The README.md

HTML/HTML5 Form Creation & Validation Tool in PHP (7.1+), (*1)

FormFormer forms HTML/HTML5 forms, and, optionally, validates their submitted field values using Valitron Validator. In case of validation error(s), forms are redisplayed with populated field values and error messages. FormFormer is decoupled from processing form submission after validation., (*2)

Please see examples/valitron.php for a minimal form with validation., (*3)

The goal was simple yet flexible code. Using immutable objects for all classes, except FieldBuilder (which optionally makes field instantiation less verbose), helps maintain simplicity. Flexibility is provided by incorporating general $attributes array properties into Form and Field classes, requiring the client programmer to have knowledge of HTML attributes and also potentially outputting invalid HTML, as most attributes are not validated., (*4)

There are certainly complexities which FF does not handle, especially related to formatting. It can be extended and/or adapted over time to handle some, and simply not used for others., (*5)

INSTALLATION
composer require it-all/form-former, (*6)

USAGE
Please see examples., (*7)

SECURITY
In order to prevent XSS, the htmlentities function is used when outputting html element attribute values (which may contain user input if client code validates input and repopulates for failures) and html element content values (for example <textarea>escaped content</textarea>)., (*8)

Further reference:
https://www.martinfowler.com/articles/web-security-basics.html
https://stackoverflow.com/questions/129677/whats-the-best-method-for-sanitizing-user-input-with-php#130323
https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet#File_uploads, (*9)

w3.org Documentation on HTML5 forms:
https://www.w3.org/TR/html5/forms.html, (*10)

The Versions

28/07 2018

dev-master

9999999-dev

HTML5 Form Creation Tool in PHP (7.1+)

  Sources   Download

MIT GPL-3.0

The Requires

  • php >=7.1

 

15/06 2018

v2.0.2

2.0.2.0

HTML5 Form Creation Tool in PHP (7.1+)

  Sources   Download

MIT

The Requires

  • php >=7.1

 

15/06 2018

v2.0.1

2.0.1.0

HTML5 Form Creation Tool in PHP (7.1+)

  Sources   Download

MIT

The Requires

  • php >=7.1

 

29/04 2018

v2.0

2.0.0.0

HTML5 Form Creation Tool in PHP (7.1+)

  Sources   Download

MIT

The Requires

  • php >=7.1

 

30/08 2017

v1.1.2

1.1.2.0

HTML5 Form Creation Tool in PHP (7+) and Twig

  Sources   Download

MIT

The Requires

 

12/08 2017

v1.1.1

1.1.1.0

HTML5 Form Creation Tool in PHP (7+) and Twig

  Sources   Download

MIT

The Requires

 

08/08 2017

v1.1

1.1.0.0

HTML5 Form Creation Tool in PHP (7+) and Twig

  Sources   Download

MIT

The Requires

 

05/08 2017

v1.0

1.0.0.0

HTML5 Form Creation Tool in PHP (7+) and Twig

  Sources   Download

MIT

The Requires