Contact Form

Permalink
Hi
I looked over and over again for a plugin, that i can use as a contact form? I really cant find any?

The meaning is, that you fill out a form, with name, mail etc, and the message is send to a email, that i choose?

How to?

View Replies:
12345j replied on at Permalink Reply
12345j
just use the form block included with c5.
gabrielkolbe replied on at Permalink Reply
I don't know, it might be me, but I struggled with creating a contact page with the form element. Easier is to create a single page and do it in php.. here is my code for anyone who is struggling. Created a single page called contact-us.php

<div id="contactdetails">
<?php $a = new Area('contactdetails'); $a->display($c); ?>
</div>
<?php $a = new Area('googlemap'); $a->display($c); ?>
<div style="padding-top:80px;">
<?php
if($_POST['postit'] == 'sendemail'){
$val = Loader::helper('validation/error');
   if ($_POST['fname'] == '') {
      $val->add('First Name can not be empty.');
   }
  if ($_POST['lname'] == '') {
      $val->add('Last Name can not be empty.');
   }
  if ($_POST['number'] == '') {
gabrielkolbe replied on at Permalink Reply
I also added :

define('EMAIL_DEFAULT_FROM_ADDRESS', [email protected]');
define('EMAIL_DEFAULT_FROM_NAME', 'My Name');
to my config/site file and then replace the email address in the contact form with the DEFault once.. like so
$mh->to(EMAIL_DEFAULT_FROM_ADDRESS, EMAIL_DEFAULT_FROM_NAME);