close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email sends, but form data not in email

Thread began 12/28/2009 5:31 pm by caroline379050 | Last modified 10/27/2010 5:47 pm by Dani Chankhour | 2385 views | 16 replies |

caroline379050

Email sends, but form data not in email

I created a test page to try this and The info I created in my form isn't sent in the email. I did not do any validation, but is this necessary?

I used Form Builder with Universal Email AND did it with building my own form. Neither sent the filled in field info that was created in the form.

Like I mentioned in the Title. I receive the email okay, just no information from the form being filled out. I am using the POST method.

Thanks
Caroline

Sign in to reply to this post

Dani Chankhour

In order to send the form data in your email, you will need to add the form data to your email.

You could do that in Universal Email by clicking the Body tab and then clicking the DW Edit button and then you can use the Bindings Panel (Window -> Bindings) to drag the form elements to your page.

Sign in to reply to this post

caroline379050

That helped some, but need to play with it more to figure out how to have the name show in the email, plus I need to send the submitter to a page stating they sent their question successfully. I found a tutorial that shows how to do this in code. Which I have been able to do, but I thought these 2 extensions would alleviate all the coding. and allow me to just design. Oh well. onward and upward.

thanks for your time.
Caroline

Sign in to reply to this post

Dani Chankhour

To include the form data in your email, yo should not have to write any custom coding. Using Dreamweaver Bindings Panel should allow you to drag the form elements to your page after you click the DW Edit button under the Body Tab in Universal Email. You could also apply your designs to the same page, such as adding tables or divs to format the output.

Sign in to reply to this post

dbarry4377469

same issue

I put the bindings in and still no data appears........

Sign in to reply to this post

dbarry4377469

Here's the form link:
testcontact.php

and email content rec'd looks like this: no data

Contact me
Required *
Name *
Please enter your name
Email *
Invalid format.Please enter a full email address
Comments *
Please provide a comment

Sign in to reply to this post

Dani Chankhour

in the WA_Universal_Email folder, please send me the file "WAUE_yourpage.php"

This will allow me to see if the binding is done correctly.

Sign in to reply to this post

dbarry4377469

Code part 1

<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "DBWEB|WA|dbarry4@mac.com";
$MailSubject = "Contact Form";
$_SERVER["QUERY_STRING"] = "";

//Global Variables

$WA_MailObject = WAUE_Definition("mail.mac.com","25","dbarry4@mac.com","","","");

if ($RecipientEmail) {
$WA_MailObject = WAUE_AddRecipient($WA_MailObject,$RecipientEmail);
}
else {
//To Entries
}

//Attachment Entries

//BCC Entries

//CC Entries

//Body Format
$WA_MailObject = WAUE_BodyFormat($WA_MailObject,0);

//Set Importance
$WA_MailObject = WAUE_SetImportance($WA_MailObject,"3");

//Start Mail Body
$MailBody = $MailBody . "<html><head>\r\n";
$MailBody = $MailBody . "<script src=\"SpryAssets/SpryValidationTextField.js\" type=\"text/javascript\"></script>\r\n";
$MailBody = $MailBody . "<script src=\"SpryAssets/SpryValidationTextarea.js\" type=\"text/javascript\"></script>\r\n";
$MailBody = $MailBody . "<link href=\"SpryAssets/SpryValidationTextField.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n";
$MailBody = $MailBody . "<link href=\"SpryAssets/SpryValidationTextarea.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n";
$MailBody = $MailBody . "</head><body>\r\n";
$MailBody = $MailBody . "<form class=\"NewFromBlank_Default\" id=\"SimpleContact_NewFromBlank_Default\" name=\"SimpleContact_NewFromBlank_Default\" method=\"post\" action=\"testcontact.php\">\r\n";
$MailBody = $MailBody . " <!--\r\n";
$MailBody = $MailBody . "WebAssist CSS Form Builder - Form v1\r\n";
$MailBody = $MailBody . "CC: Contact\r\n";
$MailBody = $MailBody . "CP: Simple Contact\r\n";
$MailBody = $MailBody . "TC: <New From Blank>\r\n";
$MailBody = $MailBody . "TP: Default\r\n";
$MailBody = $MailBody . "-->\r\n";
$MailBody = $MailBody . " <ul class=\"NewFromBlank_Default\">\r\n";
$MailBody = $MailBody . " <li>\r\n";
$MailBody = $MailBody . " <fieldset class=\"NewFromBlank_Default\" id=\"Contact_me\">\r\n";
$MailBody = $MailBody . " <legend class=\"groupHeader\">Contact me</legend>\r\n";
$MailBody = $MailBody . " <ul class=\"formList\">\r\n";
$MailBody = $MailBody . " <li class=\"formItem\"> <span class=\"fieldsetDescription\"> Required * </span></li>\r\n";
$MailBody = $MailBody . " <li class=\"formItem\">\r\n";
$MailBody = $MailBody . " <div class=\"formGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"lineGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fullColumnGroup\">\r\n";
$MailBody = $MailBody . " <label for=\"Contact_me_group_Name\" class=\"sublabel\" > Name<span class=\"requiredIndicator\">&nbsp;*</span></label>\r\n";
$MailBody = $MailBody . " ";
$MailBody = $MailBody . (ValidatedField("testcontact","Contact_me_group_Name"));
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <div class=\"errorGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldPair\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldGroup\"> <span id=\"Contact_me_group_Name_Spry\">\r\n";
$MailBody = $MailBody . " <input id=\"Contact_me_group_Name\" name=\"Contact_me_group_Name\" type=\"text\" value=\"";
$MailBody = $MailBody . ((isset($_GET["invalid"])?ValidatedField("testcontact","Contact_me_group_Name"):""));
$MailBody = $MailBody . "\" class=\"formTextfield_Large\" tabindex=\"1\" onblur=\"hideServerError('Contact_me_group_Name_ServerError');\"/>\r\n";
$MailBody = $MailBody . " <span class=\"textfieldRequiredMsg\">Please enter your name</span></span>\r\n";
$MailBody = $MailBody . " ";

if (ValidatedField('testcontact','testcontact')) {
if ((strpos((",".ValidatedField("testcontact","testcontact").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <span class=\"serverInvalidState\" id=\"Contact_me_group_Name_ServerError\">Please enter your name</span>\r\n";
$MailBody = $MailBody . " ";
//WAFV_Conditional testcontact.php testcontact(1:)

Sign in to reply to this post

dbarry4377469

code part 2

}
}
}
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " <div class=\"lineGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fullColumnGroup\">\r\n";
$MailBody = $MailBody . " <label for=\"Contact_me_group_Email\" class=\"sublabel\" > Email<span class=\"requiredIndicator\">&nbsp;*</span></label>\r\n";
$MailBody = $MailBody . " ";
$MailBody = $MailBody . (ValidatedField("testcontact","Contact_me_group_Email"));
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <div class=\"errorGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldPair\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldGroup\"> <span id=\"Contact_me_group_Email_Spry\">\r\n";
$MailBody = $MailBody . " <input id=\"Contact_me_group_Email\" name=\"Contact_me_group_Email\" type=\"text\" value=\"";
$MailBody = $MailBody . ((isset($_GET["invalid"])?ValidatedField("testcontact","Contact_me_group_Email"):""));
$MailBody = $MailBody . "\" class=\"formTextfield_Large\" tabindex=\"2\" onblur=\"hideServerError('Contact_me_group_Email_ServerError');\"/>\r\n";
$MailBody = $MailBody . " <span class=\"textfieldInvalidFormatMsg\">Invalid format.</span><span class=\"textfieldRequiredMsg\">Please enter a full email address</span></span>\r\n";
$MailBody = $MailBody . " ";

if (ValidatedField('testcontact','testcontact')) {
if ((strpos((",".ValidatedField("testcontact","testcontact").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <span class=\"serverInvalidState\" id=\"Contact_me_group_Email_ServerError\">Please enter a full email address</span>\r\n";
$MailBody = $MailBody . " ";
//WAFV_Conditional testcontact.php testcontact(2:)
}
}
}
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " <div class=\"lineGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fullColumnGroup\">\r\n";
$MailBody = $MailBody . " <label for=\"Contact_me_group_Comments\" class=\"sublabel\" > Comments<span class=\"requiredIndicator\">&nbsp;*</span></label>\r\n";
$MailBody = $MailBody . " ";
$MailBody = $MailBody . (ValidatedField("testcontact","Contact_me_group_Comments"));
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . " <div class=\"errorGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldPair\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldGroup\"> <span id=\"Contact_me_group_Comments_Spry\">\r\n";
$MailBody = $MailBody . " <textarea name=\"Contact_me_group_Comments\" id=\"Contact_me_group_Comments\" class=\"formTextarea_Medium\" rows=\"1\" cols=\"1\" tabindex=\"3\" onblur=\"hideServerError('Contact_me_group_Comments_ServerError');\">";
$MailBody = $MailBody . ((isset($_GET["invalid"])?ValidatedField("testcontact","Contact_me_group_Comments"):""));
$MailBody = $MailBody . "</textarea>\r\n";
$MailBody = $MailBody . " <span class=\"textareaRequiredMsg\">Please provide a comment</span></span> </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </li>\r\n";
$MailBody = $MailBody . " <li class=\"formItem\">\r\n";
$MailBody = $MailBody . " <div class=\"formGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"lineGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"columnGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"columnGroup\">\r\n";
$MailBody = $MailBody . " <label for=\"Contact_me_group_Security_code\" class=\"sublabel\" >&nbsp;</label>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " <div class=\"columnGroup\" style=\"clear:left;\">\r\n";
$MailBody = $MailBody . " <div class=\"errorGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldPair\"> </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " <div class=\"wideColumnGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"wideColumnGroup\" style=\"clear:left;\">\r\n";
$MailBody = $MailBody . " <div class=\"errorGroup\">\r\n";
$MailBody = $MailBody . " <div class=\"fieldPair\"> </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </div>\r\n";
$MailBody = $MailBody . " </li>\r\n";
$MailBody = $MailBody . " </ul>\r\n";
$MailBody = $MailBody . " </fieldset>\r\n";
$MailBody = $MailBody . " </li>\r\n";
$MailBody = $MailBody . " </ul>\r\n";
$MailBody = $MailBody . "</form>\r\n";
$MailBody = $MailBody . "<script type=\"text/javascript\">\r\n";
$MailBody = $MailBody . "<!--\r\n";
$MailBody = $MailBody . "var Contact_me_group_Name_Spry = new Spry.Widget.ValidationTextField(\"Contact_me_group_Name_Spry\", \"none\",{validateOn:[\"blur\"]});\r\n";
$MailBody = $MailBody . "var Contact_me_group_Email_Spry = new Spry.Widget.ValidationTextField(\"Contact_me_group_Email_Spry\", \"email\",{validateOn:[\"blur\"]});\r\n";
$MailBody = $MailBody . "var Contact_me_group_Comments_Spry = new Spry.Widget.ValidationTextarea(\"Contact_me_group_Comments_Spry\",{validateOn:[\"blur\"]});\r\n";
$MailBody = $MailBody . "//-->\r\n";
$MailBody = $MailBody . "</script>\r\n";
$MailBody = $MailBody . "</body></html>";
//End Mail Body

$WA_MailObject = WAUE_SendMail($WA_MailObject,$MailAttachments,$MailBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$MailSubject,$MailBody);

$WA_MailObject = null;
?>

Sign in to reply to this post

Dani Chankhour

Thanks.

It looks like you did not do the bindings correctly. You only included the html, but no the value of the form elements.

When you click the DW Edit button, open the Bindings Panel by going to Window -> Bindings in Dreamweaver. And then expand the form entry (for example, it might said something like "SimpleContact_NewFormBlank_..."), and under it you will see the bindings, such as the name, email and comments. Then drag each one of those to emailbody box.

I have attached a sample of how your Universal Email page should look like.

Attached Files
WAUE_untitled1_1.zip
Sign in to reply to this post
loading

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