27 lines
676 B
PHP
27 lines
676 B
PHP
|
<?php
|
||
|
|
||
|
require_once 'vendor/autoload.php';
|
||
|
$form = new Formr\Formr('bootstrap');
|
||
|
$form->required = '*';
|
||
|
if ($form->submitted())
|
||
|
{
|
||
|
// get our form values and assign them to a variable
|
||
|
$data = $form->validate('Vorname, Name');
|
||
|
|
||
|
// show a success message if no errors
|
||
|
if($form->ok()) {
|
||
|
$form->success_message = "Thank you, {$data['name']}!";
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
|
||
|
<body class="container">
|
||
|
<?php
|
||
|
$form->messages();
|
||
|
$form->create_form('Firma, Vorname, Name, Strasse, PLZ, Ort, Email, Stundenlohn, Comments|textarea');
|
||
|
?>
|
||
|
</body>
|
||
|
</html>
|