Login and Logout

Login

site/snippets/kart/login.php
<form method="POST" action="<?= kart()->urls()->login() ?>">
    <label>
        <input type="email" name="email" required
                  placeholder="<?= t('email') ?>" autocomplete="email"
                  value="<?= urldecode(get('email', '')) ?>">
    </label>
    <label>
        <input type="password" name="password" required
               placeholder="<?= t('password') ?>" autocomplete="off">
    </label>
    <?php // TODO: You could add an invisible CAPTCHA here, like...?>
    <?php // snippet('kart/turnstile-form')?>
    <input type="hidden" name="redirect" value="<?= $page?->url() ?>">
    <button type="submit" onclick="this.disabled=true;this.form.submit();"><?= t('login') ?></button>
</form>

Logout

site/snippets/kart/logout.php
<form method="POST" action="<?= kart()->urls()->logout() ?>">
    <input type="hidden" name="redirect" value="<?= url('kart') ?>">
    <button type="submit" onclick="this.disabled=true;this.form.submit();">Logout</button>
</form>
Kirby Kart is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2025 Bruno Meilick All rights reserved.