Good evening,
I am new with Kirby and setting up a multilangual site by converting an HTML template to Kirby (on the most current Kirby 4 Alpha). During this, I am trying to bring my designed form to life but I cannot get it to work - to me it looks like the form data is never posted to the controller and hence nothing happens.
Now I have the following nice looking form, borrowing from Kirby docs:
<?php if($success): ?>
<div class="alert success">
<p><?= $success ?></p>
</div>
<?php else: ?>
<?php if (isset($alert['error'])): ?>
<div><?= $alert['error'] ?></div>
<?php endif ?>
<div id="formcontainer">
<form id="formcontainerinner" method="post" action="<?= $page->url() ?>">
<div class="honeypot">
<label for="website">Website <abbr title="required">*</abbr></label>
<input type="url" id="website" name="website" tabindex="-1">
</div>
<div id="nameemail">
<div id="name">
<div class="fcf-input-group">
<input type="text" placeholder="<?= $site->getInTouchName() ?>" id="inputname" name="Name" minlength="3" maxlength="25" required class="required" onkeyup="enableSubmit()">
</div>
</div>
<div id="email">
<div class="fcf-input-group">
<input type="email" placeholder="<?= $site->getInTouchEmail() ?>" id="inputemail" name="Email" minlength="5" required class="required" onkeyup="enableSubmit()">
</div>
</div>
</div>
<div id="message">
<div id="inputmessage">
<textarea id="fieldformessage" placeholder="<?= $site->getInTouchMessage() ?>" name="Message" class="fcf-form-control required" rows="6" maxlength="3000" required onkeyup="enableSubmit()"></textarea>
</div>
</div>
<div id="agreesection">
<div id="switchtext">
<label class="switch">
<input id="checkbox" type="checkbox" unchecked required class="required" onclick="enableSubmit()">
<span class="slider round"></span>
</label>
<p id="agreetext">
<?= $site->getInTouchConfirmToS() ?>
</p>
</div>
<div>
<input onclick="validateEmail()" style="cursor: pointer;" id="submit" type="submit" value="Submit" class="button buttongradientsaturated buttonsend">
</div>
</div>
</form>
<?php endif ?>
This file is stored under site/templates/home.php. Since English is defined as my default language, when I go to www .mywebsite.com/en, it reroutes to www .mywebsite.com and shows me this home page.
Now in the form though, the code of the rendered site shows
<form id="formcontainerinner" method="post" action="https://www.mywebiste.com/en">
(I thought this was the mistake but it is not, hardcoding in …mysite.com without the /en does not change anything)
My controller lies in
site/controllers/home.php
and is exactly the same as the one in the docs (Email contact form | Kirby CMS (getkirby.com) ) except that I renamed “text” to “message” to confirm with my HTML fields.
When I fill out the form and click the send button - the website loads again but nothing happens. No e-mail, no error (debug is on), nothing.
What am I doing wrong? My eyes are blind after too much coding ![]()
Thanks
Andreas

