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