CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 on click send email

Print topic Send  topic

Author Message
wonderin
Posted: 02/23/2005, 10:14 PM

how do I submit the entire contents of a form?

when I add a button with send email action my choice are only to, from, subject and msg.

i want my msg. to be all field entered and i'm only given a choice of 1 field from the drop down menu.

obviously i'm missing something. please help if you can
Baelder
Posted: 02/24/2005, 8:49 AM

Hi Wonderin,

The only thing to do is modify your AfterInsert Sendmail by adding one or more variavle refering to other field in your form after the ini_set line like :

$var1 = $form1->field1->GetText();

Then in the message add a reference to this variable like :

$message = "message text $var1";
wonderin
Posted: 02/24/2005, 3:10 PM

Thanks so much! Below is my code which works fine. Except I want a break between field. I tried adding <br> and "<br>" but they didn't work.

//Send Email @25-8A5A3C87
global $classes_available;
ini_set("SMTP", "mail.mydomain.com");
$var1 = $classes_available->TextBox1->GetValue();
$var2 = $classes_available->class_location->GetValue();
$var3 = $classes_available->start_date->GetText();
$var4 = $classes_available->end_date->GetText();
$to = $classes_available->to->GetText();
$subject = "Class Registration";
//$message = $classes_available->class_number->GetValue();
$message = "Class Information: $var1, $var2, $var3, $var4";
$from = $classes_available->from->GetText();
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain";
mail ($to, $subject, $message, $additional_headers);
ini_restore("SMTP");
//End Send Email
Baelder
Posted: 02/26/2005, 9:44 AM

Hi again Wonderin,

To obtain the result you want with <br> or other html tags, you have to set HTML on True on your SendEmail event then you only have to write HTML in your message. But where there is double quotes you need to put a backslash like this :

width="350"

become

width=\"350\"

Usualy I use Dreamweaver to make my own mail template, then I replace all doublequotes by doublequote with backslash before in the sourcecode. It work perfectly. So you can also use tables.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.