0 Replies Latest reply on Feb 2, 2011 9:40 AM by stmigs

    Contact Form No Message String




      I have been working with a flash template and have problem with my contact form. I am receiving the form but content does not appear to be posting correctly and I am not getting any information from my message field.


      Here is my formConfiguration.xml (my hosting site said I have to use webformmailer.php or gdform.php instead of contact.php)


      <?xml version="1.0" encoding="utf-8"?>













      <messageSentText>THANK YOU FOR YOUR MESSAGE.</messageSentText>









      <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>




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




      <messageSentFailedText>SORRY, YOUR MESSAGE COULDN'T BE SENT</messageSentFailedText>


















      <subjectSource>Contact Form from your site</subjectSource>





      Here is my webformmailer.php




      $mail_body = '';


      //-----------------Getting data sent by flash---------------------

      foreach ($_POST as $key => $value){


      if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' &&  $key != 'mail_subject' && $key != 'plain_text'){


      $mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';


      $mail_body .= ''.stripslashes($value).'<br/>';







      $message = '<html><body>'.$mail_body.'</body></html>'; //  mail body


      //------------if plain text is set to true removing html tags------

      if ($_POST['plain_text']=='true') {


      $message = str_replace('<br/>',"\r\n", $message);


      $message = strip_tags($message);



      } else {

      //----otherwise composing message headers---------------------------

      $headers  = 'MIME-Version: 1.0' . "\r\n";


      $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";




      //------------setting conf data-------------------------------------

      $to = $_POST['mail_to'];


      $from = $_POST['mail_from'];


      $subject = $_POST['mail_subject'];


      $smtp_server = $_POST['smtp_server'];


      $smtp_port = $_POST['smtp_port'];



      //---------setting header info--------------------------------------

      $headers .= 'From: ' .$from. "\r\n";




      if (mail($to, $subject, $message, $headers)){ // sending mail




      } else {








      The hosting site did say that I should use this code for my form but it doesn't work or I don't know how to modify the code


      <form action="/webformmailer.php" method="post">
      <input type="hidden" name="subject" value="Submission" />
      <input type="hidden" name="redirect" value="thankyou.html" />
      First Name: <input type="text" name="FirstName" />
      Last Name :<input type="text" name="LastName" />
      Email: <input type="text" name="email" />
      Comments: <textarea name="comments" cols="40" rows="10">
      Type comments here.</textarea>
      <input type="submit" name="submit" value="submit"/>
      <input type="hidden" name="form_order" value="alpha"/> <input type="hidden" name="form_delivery" value="hourly_digest"/> <input type="hidden" name="form_format" value="html"/> </form>