niklas / form
Data access object
v1.0.1
2017-08-10 13:33 UTC
Requires
- nette/tester: ^1.7
This package is not auto-updated.
Last update: 2025-03-30 03:37:32 UTC
README
Render bootstrap 3.2 html forms
Example
$form = new ActionForm(null, "POST"); $form->addInput("name", "Name")->required("Please enter a name!"); $form->addInput("email", "Email", "email")->required("Please enter a valid email!"); $form->addInput("pass", "Password", "password")->required("Please enter a password!"); $form->setSubmit("Submit", "send"); $form->setData(@$_POST); $form->onSubmit( "send", function ($fdata) { echo "DATA SEND"; } ); echo $form->render();
Install
Niklas/Form is available at packagist.org.
insall it using composer:
composer require niklas/form