codesignd website at codesignd.com/codesignd.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
761 B

<?php
use Uniform\Form;
return function($site, $pages, $page) {
$form = new Form([
'name' => [
'rules' => ['required'],
'message' => l::get('contact.message.name-invalid', 'Please enter your name.')
],
'email' => [
'rules' => ['required', 'email'],
'message' => l::get('contact.message.email-invalid', 'Please enter a valid email address.')
],
'message' => []
]);
// Disable some Uniform features
$form->withoutRedirect()->withoutFlashing();
if(r::is('POST')) {
$form->emailAction([
'to' => qdated(),
'from' => 'codesignd form <no-reply@codesignd.de>',
'subject' => 'Message from the contact form (' . $site->title() . ')',
'snippet' => 'email-templates/contact'
]);
}
return compact('form');
};