Contact Form not sending Email

Hello everyone,

I’m still learning PHP, HTML, JAVA and all the rest. So I’m pretty new at all of this. Please don’t hammer me if this has been asked before I can’t seem to find anything else related…

I’ve got the " Notes " theme for Kirby, purchased my personal license and love it.
I know how to change basic things, and understand the bottom-line stuff.

But what I can’t workout - is this damn Contact Form?

I’ve done test emails to my self only to find that the person who fills out the form, lets say me for example I put my email, name, message in - receive the email… but there is no Email address of the person actually sending it off? If you get my drift. I had a look at the code and it seems to have the email ’ value ’ in it? I don’t know what is going on.

I do believe it’s the UniForm plugin attached to this theme.

So basically 2 things i’d like to do:

1. Get the email data from the person filling out the contact form, in the actual message I receive from the form
2. How do I add fields, Subject, Etc?

The UniForm plugin has quite extensive documentation. And there’s also a blogpost: https://blog.the-inspired-ones.de/kirby-with-uniform

Note that this blogpost refers to v2 of the plugin, but I assume it’s the one that’s used in the template.

Thanks for the reply, but i’m finding it difficult to understand.

By default, the senders address is not part of the email body. If you want more information in the body of the mail, you can use a snippet, that you put into the site/snippets/ folder. An example can be found here: https://github.com/mzur/kirby-uniform/blob/v2/snippets/uniform-email-table.php

If you want a separate subject field for the user to fill in, you have to add a new field to the form in the contact.php template (or whatever the template is called in your theme), similar to the email field, just with its own name etc., something like:

<label class="textfield-label" for="subject">Subject: *</label>
<input class="textfield-input" type="text" id="subject" name="subject" placeholder="Some subject"  value="<?php $form->echoValue('subject') ?>" required  />