# Contact form on One-Pager Kirby 5

**URL:** <https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296>\
**Category:** Questions\
**Tags:** v5\
**Created:** [March 18, 2026, 11:48pm UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296 "2026-03-18T23:48:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [March 18, 2026, 11:48pm UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296/1 "2026-03-18T23:48:15Z")

</div>

I used a contact from before with Kirby 2 and 3 and was able to make it work on a one-pager.

> **[Contact form](https://getkirby.com/docs/cookbook/forms/basic-contact-form)**
>
> Create a basic contact form that sends HTML or plain text emails.

– Changed the controller to home.php  
(inlcuding adding the email information)  
– changed the $data to $form (data is already used for the sections)  
– configured the smtp server and email in config.php  
– email templates are present  
– $form, $alert and $success are also passed into the snippet

What else might I be missing?  
The website/contact page also does not send, only gives a positive response.

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [March 19, 2026, 12:37am UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296/2 "2026-03-19T00:37:10Z")

</div>

It would be helpful if you post the complete code.

> [@ewalthert](#):
>
> The website/contact page also does not send, only gives a positive response.

Can you elaborate what you mean? Is there a separate contact page with the form? Or is the form on home or both?

---

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [March 19, 2026, 6:52am UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296/3 "2026-03-19T06:52:21Z")

</div>

Dear @pixelijn , thanks for your response.  
Yes I added a seperate template with the contact form, to see if that would work.

The contact form on a sub-page is 100% according to the cookbook.  
Only with the added email configuration.

The page shows the `$success` message, but nothing is sent.

[EDIT] the contact form on the subpage sends now.  
Only the omepage does not work yet.

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [March 19, 2026, 7:11am UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296/4 "2026-03-19T07:11:57Z")

</div>

> [@ewalthert](#):
>
> Only the omepage does not work yet.

What exactly does not work? Where is the controller now? Note that the forms `action` attribute needs to point to the page where you have the controller.

---

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [March 19, 2026, 7:23am UTC](https://forum.getkirby.com/t/contact-form-on-one-pager-kirby-5/35296/5 "2026-03-19T07:23:02Z")

</div>

The form is pointing to the front page.

I removed the section ID (#contact), but it still does not work

`<form method="post" action="<?= $page->url() ?>">`

I finally got it to work, by removing the action:

`<form method="post">`
