Hi,
I’am trying to install the uniform-plugin but can’t get it running. It’s validate the entry but then nothing happens.
Is there a problem with a onepager?
This is the information for the post request:
The contoller in controllers/home.php:
<?php
return function($site, $pages, $page, $data) {
$form = uniform('contact-form', [
'required' => [
'name' => '',
'_from' => 'email'
],
'actions' => [
[
'_action' => 'email',
'to' => 'tkiometzis@threehorses.de',
'sender' => 'info@swing-ticket.de',
'subject' => 'New message from the contact form'
]
]
]);
return compact('form');
};
and the snippet:
<section id="<?php echo $data->uid(); ?>" data="id_<?php echo $data->autoid(); ?>">
<div class="section__inner">
<header>
<h1><?php echo $data->title() ;?></h1>
<?php echo($data->text()->kirbytext()); ?>
</header>
<div class="main" role="main">
<form action="<?php echo $page->url()?>#form" method="post">
<label for="name" class="required">Name</label>
<input<?php e($form->hasError('name'), ' class="erroneous"')?> type="text" name="name" id="name" value="<?php $form->echoValue('name') ?>" required/>
<label for="email" class="required">E-Mail</label>
<input<?php e($form->hasError('_from'), ' class="erroneous"')?> type="email" name="_from" id="email" value="<?php $form->echoValue('_from') ?>" required/>
<label for="message">Message</label>
<textarea name="message" id="message"><?php $form->echoValue('message') ?></textarea>
<label class="uniform__potty" for="website">Please leave this field blank</label>
<input type="text" name="website" id="website" class="uniform__potty" />
<a name="form"></a>
<?php if ($form->hasMessage()): ?>
<div class="message <?php e($form->successful(), 'success' , 'error')?>">
<?php $form->echoMessage() ?>
</div>
<?php endif; ?>
<button type="submit" name="_submit" value="<?php echo $form->token() ?>"<?php e($form->successful(), ' disabled')?>>Submit</button>
</form>
</div>
</div>
</section>
Thanks for help