Unifom plugin with onepager

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

You form tag is missing the class class="contact-form".

Hi @texnixe,
do you mean:

<form class="contact-form" action="<?php echo $page->url()?>...

this is also not working.

Try with the id instead of the class :wink:

If that does not work:

Can you send emails from your server?

Do you have file caching enabled?

ohh, thank you,
I see…, the server only send mail with smtp. So I need a authentication :confused:

but nevertheless, shouldn’t I get error message?!

And is there a way to handover the authentication data?

Check out this post: How to use kirby email function with SMTP authentication?

thank you @texnixe,
that will take while… :worried:

Maybe someone has already done it and is ready to help @invasoria?