2017 © Pedro Peláez
 

library lib-form

Abstract set of common handling for Form helper libraries

image

openlss/lib-form

Abstract set of common handling for Form helper libraries

  • Tuesday, April 9, 2013
  • by nullivex
  • Repository
  • 3 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

openlss/lib-form

Form helpers for creating radio buttons, drop downs, and checkboxes, (*1)

It contains classes for each field type as show below, (*2)

openlss/lib-form-checkbox

Checkbox builder for HTML pages can be used with various templating, (*3)

Usage

use \LSS\Form\Checkbox;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring checkbox form
echo Checkbox::_get()->setOptions($arr)->setName('test')->setValue(1);

toString

To get the HTML from this class simply transform it to a string., (*4)

Examples, (*5)

echo $form_obj;
$checkboxes = (string)$form_obj;

Reference

(object) _get()

Shortcut for constructor, (*6)

(object) setOptions($arr)

Sets the options to this array, (*7)

(object) addOption($key,$value)

Adds an option, (*8)

(object) setName($name)

Set name of the checkbox elements, (*9)

(object) setValue($value)

Set the current value to be checked (can be an array for multiple checkboxes), (*10)

(object) addValue($value)

Adds a set value to the array, (*11)

(void) breakAfterEach()

Call this to turn on line breaks after each checkbox, (*12)

(object) addCssClass($class)

Adds a CSS class to each element, (*13)

(objet) addExtra($extra)

Add extra parameters to the HTML element containing the object, (*14)

openlss/lib-form-drop

Dropdown select builder for HTML pages can be used with various templating, (*15)

Usage

use \LSS\Form\Drop;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Drop::_get()->setOptions($arr)->setName('test')->setValue(1);

toString

To get the HTML from this class simply transform it to a string., (*16)

Examples, (*17)

echo $form_obj;
$drop = (string)$form_obj;

Reference

(object) _get()

Shortcut for constructor, (*18)

(object) setOptions($arr)

Sets the options to this array, (*19)

(object) addOption($key,$value)

Adds an option, (*20)

(object) setName($name)

Set name of the checkbox elements, (*21)

(object) setValue($value)

Set the current value to be checked, (*22)

(object) addCssClass($class)

Adds a CSS class to each element, (*23)

(objet) addExtra($extra)

Add extra parameters to the HTML element containing the object, (*24)

openlss/lib-form-radio

Radio button builder for HTML pages can be used with various templating, (*25)

Usage

use \LSS\Form\Radio;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Radio::_get()->setOptions($arr)->setName('test')->setValue(1);

toString

To get the HTML from this class simply transform it to a string., (*26)

Examples, (*27)

echo $form_obj;
$radio = (string)$form_obj;

Reference

(object) _get()

Shortcut for constructor, (*28)

(object) setOptions($arr)

Sets the options to this array, (*29)

(object) addOption($key,$value)

Adds an option, (*30)

(object) setName($name)

Set name of the checkbox elements, (*31)

(object) setValue($value)

Set the current value to be checked, (*32)

(object) addCssClass($class)

Adds a CSS class to each element, (*33)

(objet) addExtra($extra)

Add extra parameters to the HTML element containing the object, (*34)

The Versions

09/04 2013

dev-master

9999999-dev http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

09/04 2013

dev-0.0.x-dev

dev-0.0.x-dev http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

09/04 2013

0.0.7

0.0.7.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

27/03 2013

0.0.2

0.0.2.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

27/03 2013

0.0.3

0.0.3.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

27/03 2013

0.0.4

0.0.4.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

27/03 2013

0.0.5

0.0.5.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

27/03 2013

0.0.6

0.0.6.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface

26/03 2013

0.0.1

0.0.1.0 http://openlss.org

Abstract set of common handling for Form helper libraries

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.2

 

form helper ui dropdown checkbox radio user interface