2017 © Pedro Peláez
 

library 1000forms

An easy way to create forms of any complexity with integrated validation and filtration

image

lanin/1000forms

An easy way to create forms of any complexity with integrated validation and filtration

  • Wednesday, July 15, 2015
  • by lanin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

1000 Forms

Features

  • It can be used in any sort of projects to build any sort of forms.
  • Any functionality can be extended. Validators, filters, elements - everything can be modified.
  • Markups of all elements and whole form can be modified as you like. Even by using a template
  • It already has a built-in engine to validate all the inputs
  • You can modify and filter all the values right in the form
  • You can create dynamic forms with array values

You can find full documentation here: http://1000forms.lanin.me, (*1)

Simple example

<?php

// Initialise object
$form = new \Lanin\Forms\Form();

// Set name of our form
$form->setName('login_form');

// Add "Name" textfield
$form->addElement('textfield', 'login', array('label' => 'Name'));
// Add "Password" element
$form->addElement('password', 'password', array('label' => 'Password'));

// And add wubmit button
$form->addElement('submit', 'login', array('value' => 'Login'));

// Check if form was submitted and values are valid
if ($form->isValid()) {
    // Get values and print them
    print_r($form->getFormState());
}

// Print our form
print $form;

Released under MIT license., (*2)

The Versions

15/07 2015

dev-master

9999999-dev

An easy way to create forms of any complexity with integrated validation and filtration

  Sources   Download

MIT

15/07 2015

0.1

0.1.0.0

An easy way to create forms of any complexity with integrated validation and filtration

  Sources   Download

MIT