[help] contact form

Reply

Join Date: Oct 2008
Posts: 3
Reputation: SYST3M4T1C is an unknown quantity at this point 
Solved Threads: 0
SYST3M4T1C SYST3M4T1C is offline Offline
Newbie Poster

[help] contact form

 
0
  #1
Apr 21st, 2009
OK I'm trying to help my friend out with this template he has but the contact form is not working.

Here is the XML document

contactFormConfiguration.xml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. -- Please read this information to learn how to set up the contact form integrated
  4. -- into the template.
  5. --
  6. -- This readme file explains in details the meaning of the settings that can be
  7. -- done in the fcContactFormConfiguration.xml configuration file.
  8. --
  9. -- It is recommended for you to use an XML editor to make changes to this file
  10. -- because it’s less possible to make an error in the markup which can cause to
  11. -- a not working contact form.
  12. -->
  13. <contactFormConfiguration>
  14.  
  15. <!--
  16. -- An e-mail address which will be used to receive messages from your contact form.
  17. -- You can specify several e-mail addresses separating them with a comma.
  18. -- For example: first_email@domain.com, second_email@domain.com, third@domain.com
  19. -->
  20. <emailTo>info@yourdomain.com</emailTo>
  21.  
  22. <!--
  23. -- A server script type which will process sending e-mails. It depends on your
  24. -- hosting and in the current version of the contact form it is allowed to use
  25. -- two types: php (Apache, PHP Hosting); asp (IIS web server, ASP).
  26. -->
  27. <serverProcessorType>php</serverProcessorType>
  28.  
  29. <!--
  30. -- A name of the script file which process sending e-mails on your server (without
  31. -- extension). The name contact is used by default.
  32. -->
  33. <serverProcessorFileName>contact</serverProcessorFileName>
  34.  
  35. <!--
  36. -- Set whether to validate only required fields (true/false). The default value is
  37. -- true which means the not required fields of your contact form will not be validated.
  38. -- For example if the e-mail field of your form is set as not required (imagine it)
  39. -- the form will be processed even if the user types in an incorrect e-mail address.
  40. -->
  41. <validateRequiredOnly>true</validateRequiredOnly>
  42.  
  43. <!--
  44. -- Set whether to submit the form when the Enter key is pressed even if the focus is
  45. -- not on the Submit button (true/false).
  46. -->
  47. <submitFormOnEnter>false</submitFormOnEnter>
  48.  
  49. <!--
  50. -- Text showing to the user when the form is submitted without any errors.
  51. -->
  52. <messageSentText>Thank you for your message.</messageSentText>
  53.  
  54. <!--
  55. -- Text showing in case the form is not submitted because of a server error.
  56. -->
  57. <messageSentFailedText>Sorry, your message couldn't be sent</messageSentFailedText>
  58.  
  59. <!--
  60. -- Text your visitor will see while waiting till the processing is over.
  61. -->
  62. <formProcessingText>processing...</formProcessingText>
  63.  
  64. <!--
  65. -- Your SMTP server (for ASP only).
  66. -->
  67. <smtpServer>localhost</smtpServer>
  68.  
  69. <!--
  70. -- Your SMTP port (for ASP only).
  71. -->
  72. <smtpPort>25</smtpPort>
  73.  
  74. <!--
  75. -- Set whether to send the message as a plain text (true) or as HTML (false).
  76. -->
  77. <plainText>false</plainText>
  78.  
  79. <!--
  80. -- ID of the input field (in the structure XML file) to use for the “from: ”
  81. -- or email to use instead (for example: mailfrom@domainname.com).
  82. -->
  83. <emailFromSource>2</emailFromSource>
  84.  
  85. <!--
  86. -- Subject of the e-mails that will be sent through this contact form or ID of
  87. -- the input field (in the structure XML file) to use for the “subject: ” label
  88. -- in your e-mail client.
  89. -->
  90. <subjectSource>Contact Form from your site</subjectSource>
  91.  
  92. <!--
  93. -- Validation error messages that are showing to the user when the form fails to
  94. -- validate. The form supports different types of validators. You can change the
  95. -- text of the error messages the validators produce here.
  96. --
  97. -- You can use the {LABEL} keyword in these messages. It will replace it with the
  98. -- label value of the field where an error occurs.
  99. -->
  100. <validationErrorMessages>
  101.  
  102. <!--
  103. -- A required field is not filled in.
  104. -->
  105. <message type="fieldIsRequired">{LABEL} is required.</message>
  106.  
  107. <!--
  108. -- The specified e-mail address is incorrect.
  109. -->
  110. <message type="emailNotValid">{LABEL} - is not valid email address.</message>
  111.  
  112. <!--
  113. -- The specified number of characters in a field is less than a required minimum.
  114. -->
  115. <message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>
  116.  
  117. <!--
  118. -- The specified string does not match with the regular expression.
  119. -->
  120. <message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>
  121.  
  122. <!--
  123. -- The specified number is greater than an acceptable biggest number for this field.
  124. -->
  125. <message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>
  126.  
  127. <!--
  128. -- The specified number is lower than an acceptable lowest number for this field.
  129. -->
  130. <message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>
  131.  
  132. <!--
  133. -- The data is not a number.
  134. -->
  135. <message type="notANumberError">{LABEL} - The data is not a number.</message>
  136.  
  137. <!--
  138. -- The specified number must not be negative.
  139. -->
  140. <message type="negativeError">{LABEL} - The specified number must not be negative.</message>
  141.  
  142. <!--
  143. -- The minimum number of variants is not selected
  144. -->
  145. <message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>
  146.  
  147. <!--
  148. -- The number of variants selected exceeds the maximum
  149. -->
  150. <message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>
  151.  
  152. <!--
  153. -- The fields that should be equal do not match
  154. -->
  155. <message type="shouldBeEqualError">{LABEL} - values do not match</message>
  156.  
  157. <!--
  158. -- The date has wrong format.
  159. -->
  160. <message type="dateIsNotValidError">{LABEL} - date has wrong format</message>
  161.  
  162. </validationErrorMessages>
  163.  
  164. </contactFormConfiguration>
  165.  

contactFormStructure.xml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <contactFormStructure>
  3.  
  4. <formItems>
  5.  
  6. <item id="1" label="Name" required="true">
  7. <textToShow>NAME</textToShow>
  8. </item>
  9.  
  10. <item id="3" label="Phone">
  11. <textToShow>PHONE</textToShow>
  12. <restrict>+-.0-9</restrict>
  13. </item>
  14.  
  15. <item id="4" label="Adress">
  16. <textToShow>ADDRESS</textToShow>
  17.  
  18. </item>
  19.  
  20. <item id="2" label="E-mail" required="true">
  21. <textToShow>E-MAIL</textToShow>
  22. <validator>EmailValidator</validator>
  23. </item>
  24.  
  25. <item id="5" label="Message" required="true">
  26. <textToShow>MESSAGE</textToShow>
  27. </item>
  28.  
  29. </formItems>
  30.  
  31. </contactFormStructure>

And here's the contact.php that goes with it
  1. &mail=0

I'm guessing the contact.php is the problem; can anyone help me please and thanks? Would be very helpful for my friend; you may contact me via MSN: [email snipped]
Last edited by Ezzaral; Apr 21st, 2009 at 1:27 pm. Reason: Email snipped. Keep it on site.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 1
Reputation: zogeth is an unknown quantity at this point 
Solved Threads: 0
zogeth zogeth is offline Offline
Newbie Poster

Re: [help] contact form

 
0
  #2
Sep 3rd, 2009
have the same problem.. no idea
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,449
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 135
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: [help] contact form

 
0
  #3
Sep 4th, 2009
I can't see a single line of php code in the code you've posted. I would suggest downloading a php form script or using the following script instead.
  1. <?
  2. if (isset($_POST['subject']) && $_POST['message']!=='')
  3. {
  4. $address = "your_real_email@domain.com"; //change this to the receiving address.
  5. $subject = "Website Email: ".$_POST['subject'];
  6. if ($_POST['name']!=='')
  7. {
  8. $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message']."<br>
  9. <br>
  10. Yours Sincerely<br>
  11. ".$_POST['name']."</td></tr></table>";
  12. } else {
  13. $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message'].
  14. "</td></tr></table>";
  15. }
  16. $headers = 'MIME-Version: 1.0' . "\r\n";
  17. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  18. $headers .= 'From: do_not_reply@your_website_form' . "\r\n";
  19.  
  20. mail($address,$subject,$body,$headers);
  21. }
  22. //below displays the form while above processes it.
  23. echo "<form method='post'>Subject: <input type=text value='' maxlength=100 name='subject' size=30><br>
  24. <textarea cols=30 rows=20 name='message'></textarea><br>Name: <input type='text' value='' name='name'>
  25. <input type='submit' value='submit'></form>";
  26. ?>
The above script is a sample script I have made myself and should do the job fine.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC