Contact Form on One Page

Hello all,

I am in despair.
I am building a One Page site according to the following instructions: One-pager site | Kirby CMS. And there I have a section in which I want to display a contact form. I would like to do this according to the following instructions: Email contact form | Kirby CMS.

However, this does not really work. If I use the contact form on a “normal page”, it works. But as soon as I want to use it in a section of my one page site, it no longer works. Does anyone have any experience here?

Hey, could you please post your code and where exactly you included it?

I have included the controller as home.php. In the home.php template file I pass the controller data to my contact snippet, where my contact form is located. I did not change any in the controller or in the contact form.

`
<?php

snippet('header');

foreach($pages->listed() as $section) {
  snippet($section->uid(), ['sectiondata' => $section, 'alert' => $alert, 'data' => $data, 'success' => 
$success]);
}

snippet('footer');

?>

`

And where does the action attribute of the form go to?

The action goes to the url of the “home” page.

action="<?= $page->url() ?>

Ok, next question. What exactly is “it no longer works”? The controller doesn’t do anything at all?

What if you do a

dump($data);

right after the header snippet in the home template?

A empty pre section appers. "it no longer works” means the page is reloading but nothing happend. the “home” page is there with an empty contact formular. And MailHog doesnt show a mail.