close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Wanting to send message to a specific department

Thread began 5/26/2010 1:56 pm by bbgd | Last modified 6/01/2010 2:33 pm by Jason Byrnes | 2527 views | 3 replies |

bbgd

Wanting to send message to a specific department

I have uploaded a contact page using the Contact Form solution. I had to place the elements into different table cells to match other forms on the site. There are 3 different departments that need to be contacted. I want the subject to reflect the department it is going to. Right now I have the e-mail addresses going back to me to make sure they work right. Right now, as far as I can determine, it's sending nothing out. I tried to follow the email advice "Form sent to email address depending on option chosen" posted by info231367 on 04-05-10 given by Jason Byrnes. I can't figure how I screwed it up but I know I did. Help

Attached Files
contactus_052610.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the coding looks correct.

Does it redirect to the thank you page?

or just stay on the contact page?

it looks like the form elements for contact name and email address are not named the same as the original contact form.

The securty elements are also removed.

This is causing the validation to fail.

remove the following code block:

php:
<?php 

if ($_SERVER["REQUEST_METHOD"] == "POST")  {
  
$WAFV_Redirect "";
  
$_SESSION['WAVT_contact_Errors'] = "";
  if (
$WAFV_Redirect == "")  {
    
$WAFV_Redirect $_SERVER["PHP_SELF"];
  }
  
$WAFV_Errors "";
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Contact_Name"]))?$_POST["Contact_Name"]:"") . "",true,1);
  
$WAFV_Errors .= WAValidateEM(((isset($_POST["Email_address"]))?$_POST["Email_address"]:"") . "",true,2);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Comments"]))?$_POST["Comments"]:"") . "",true,3);
  
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_code"]):"") . "",((isset($_SESSION["captcha_1"]))?strtolower($_SESSION["captcha_1"]):"") . "",true,4);
  
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?strtolower($_SESSION["random_answer"]):"") . "",true,5);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);

  if (
$WAFV_Errors != "")  {
    
PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }
}
?>




this is validating form elements that doent exist in your form causing validation to fail.

Sign in to reply to this post

bbgd

That helped and I am getting the Thank you page to come up.

When you say "it looks like the form elements for contact name and email address are not named the same as the original contact form" I can't find the difference. Could you point me to it.

Also, when I receive the e-mail I get 2 each time. The first email is empty and the second shows the info below. It doesn't show what I have created for the message and it doesn't have the subject line I need it to have. The body is just the name of the binding.

Example below:

Contact Form Response
sendTo: mailAdmin@brosco-bartley.com
contactName: Boyd
contactCompany: Brosco-bartley
contactEmail: bbgd@sbcglobal.net
contactPhone: 817-2381-0884
contactPreference: Email
contactComments: Lorem ipsum d...

Is there anything else I need to get you to help?

Sign in to reply to this post

Jason ByrnesWebAssist

the form element names used by the original contact form solution pack are:
Contact_Name
Email_address
Comments


you are using:
contactName
contactEmail
contactComments



Instead of using two separate recipient line:

php:
$RecipientEmail = "".(isset($_POST['sendTo'])?$_POST['sendTo']:"")  ."";include("WA_Universal_Email/WAUE_contact_1.php");

$RecipientEmail = "mailadmin@brosco-bartley.com";include("WA_Universal_Email/WAUE_contact_1.php");



you can combine them into one:

php:
$RecipientEmail = "".(isset($_POST['sendTo'])?$_POST['sendTo']:"")  .",mailadmin@brosco-bartley.com";include("WA_Universal_Email/WAUE_contact_1.php");




that message looks correct according to the WA_UniversalEmail/templates/contactus.php file that is being used to generate the email body.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...