HazzelForms
Create, validate and mail PHP forms in minutes!
HazzelForms is a lightweight, PHP >= 7 based form framework. It helps developers to create, validate and send html forms with just a few lines of code while still providing flexibility for customisation.
HazzelForms uses HTML tags sparingly and does not include any CSS. Thus, it can easily be combined with grid systems like FlexBoxGrid, Bootsrap, material.io or any other grid system.
Example
More form with less code:
Demo form
Behind the scenes
require_once __DIR__ . '/HazzelForms/autoload.php';
$form = new HazzelForms\HazzelForm();
$form->addField('Demo name', 'text', ['placeholder' => 'Name']);
$form->addField('Demo email', 'email', ['placeholder' => 'E-Mail']);
$form->addField('Demo cat', 'dropdown', ['first' => '- Category -',
'options' => array(
'Manufacturing',
'Shipping',
'Human Resources'
)]);
if($form->validate()){
$form->sendMail('marketing@example.com');
}
$form->renderAll();