dev-master
9999999-devAn easy way to create forms of any complexity with integrated validation and filtration
MIT
by Maxim Lanin
0.1
0.1.0.0An easy way to create forms of any complexity with integrated validation and filtration
MIT
by Maxim Lanin
Wallogit.com
2017 © Pedro Peláez
An easy way to create forms of any complexity with integrated validation and filtration
You can find full documentation here: http://1000forms.lanin.me, (*1)
<?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)
An easy way to create forms of any complexity with integrated validation and filtration
MIT
An easy way to create forms of any complexity with integrated validation and filtration
MIT