Forum Moderators: coopster

Message Too Old, No Replies

xml template from template monster contact form

having problems

         

confused designer

12:54 am on Nov 16, 2010 (gmt 0)

10+ Year Member



Hi. I am a very new designer working on my first page template ever and i have ran into a road block.

I am trying to figure out how to set up the contact form. I have two contact form files a formConfiguration.xml and a contact.php. I have tried to follow what i am reading but i am having alot of problems. If anyone has had this problem before and knows what to do i would really appreciate it. I have posted what the two forms look like below. thank you for any help.

contact php

<?php
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);

$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]*>/", "", $pre_array[0]);
$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]*>/", "", $pre_array[1]);
}
next($_REQUEST);
}



reset($post_vars);


$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>


formConfiguration

<?xml version="1.0" encoding="utf-8"?>
<!--
Please read this information to learn how to set up the contact form integrated
into the template.

This readme file explains in details the meaning of the settings that can be
done in the fcContactFormConfiguration.xml configuration file.

It is recommended for you to use an XML editor to make changes to this file
because it’s less possible to make an error in the markup which can cause to
a not working contact form.
-->
<contactFormConfiguration>

<!--
An e-mail address which will be used to receive messages from your contact form.
You can specify several e-mail addresses separating them with a comma.
For example: first_email@domain.com, second_email@domain.com, third@domain.com
-->
<emailTo>david@tlcpetsitting.net,davidpiazza1984@yahoo.com</emailTo>

<!--
A server script type which will process sending e-mails. It depends on your
hosting and in the current version of the contact form it is allowed to use
two types: php (Apache, PHP Hosting); asp (IIS web server, ASP).
-->
<serverProcessorType>php</serverProcessorType>

<!--
A name of the script file which process sending e-mails on your server (without
extension). The name contact is used by default.
-->
<serverProcessorFileName>contact</serverProcessorFileName>

<!--
Text showing to the user when the form is submitted without any errors.
-->
<messageSentText>THANK YOU FOR YOUR MESSAGE.</messageSentText>

<validationMessages>
<email>This is not a valid e-mail address</email>
<empty>All required fields must be filled</empty>
<ntext>This is not a valid text</ntext>
<digits>Not valid characters</digits>
</validationMessages>

<exitFullScreenMsg>You have to exit fullscreen mode to use contact form</exitFullScreenMsg>


<!--
Text showing in case the form is not submitted because of a server error.
-->
<messageSentFailedText>SORRY, YOUR MESSAGE COULDN'T BE SENT</messageSentFailedText>

<!--
Text your visitor will see while waiting till the processing is over.
-->
<formProcessingText>PROCESSING...</formProcessingText>

<!--
Your SMTP server (for ASP only).
-->
<smtpServer>localhost</smtpServer>

<!--
Your SMTP port (for ASP only).
-->
<smtpPort>25</smtpPort>

<!--
Set whether to send the message as a plain text (true) or as HTML (false).
-->
<plainText>true</plainText>

<!--
ID of the input field (in the structure XML file) to use for the “from: ”
or “sender: ” label in your e-mail client.
-->
<emailFromSource>1</emailFromSource>

<!--
Subject of the e-mails that will be sent through this contact form or ID of
the input field (in the structure XML file) to use for the “subject: ” label
in your e-mail client.
-->
<subjectSource>Contact Form from your site</subjectSource>

</contactFormConfiguration>


I apologize if its obvious but like i said im extremely new to this and any help would be appreciated.

coopster

8:19 pm on Nov 25, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, confused designer.

Did you resolve your form issue?