email()->validate('user-email'); // check for errors if ($validator->hasErrors()) { $_SESSION['errors']['car-rental-form'] = $validator->getAllErrors(); } else { $email_config = array( 'sender_email' => 'contact@phpformbuilder.pro', 'sender_name' => 'Php Form Builder', 'recipient_email' => addslashes($_POST['user-email']), 'subject' => 'Php Form Builder - Car Rental Form', 'filter_values' => 'car-rental-form', 'sent_message' => '

Your message has been successfully sent !

' ); $sent_message = Form::sendMail($email_config); Form::clear('car-rental-form'); } } /* ================================================== The Form ================================================== */ $form = new Form('car-rental-form', 'horizontal', 'novalidate', 'foundation'); // $form->setMode('development'); $form->startFieldset('Rent a car'); /*---------- Foundation accordion 1 ----------*/ $form->addHtml(' '); $form->setCols(-1, -1); $form->centerButtons(true); $form->addBtn('submit', 'submit-btn', 1, 'Submit', 'class=success button'); $form->endFieldset(); // Custom radio & checkbox css $form->addPlugin('nice-check', 'form', 'default', ['%skin%' => 'yellow']); // jQuery validation $form->addPlugin('formvalidation', '#car-rental-form'); ?> Foundation Car Rental Form - How to create PHP forms easily printIncludes('css'); ?>

Car Rental Form

render(); ?>
printIncludes('js'); $form->printJsCode(); ?>