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

 Get Listbox Value

Print topic Send  topic

Author Message
RacerX

Posts: 8
Posted: 01/22/2013, 12:54 PM

After I click submit on the form I then send an email to the sales staff to let them know that a new request for more information has been received.
The problem is I use a couple of listboxes and radio buttons on the form and in the body of the email its only sending the unique id no the displayed text.
I've been playing with CCDlookup to no avail. I know its very simple and am probably just missing something basic. Below is the code without any CCDLookup or mods:

//Custom Code @28-2A29BDB7
// -------------------------
// Send an email to sales to let them know that request for more information is waiting
$from = $cs_contact->contact_email->GetValue();
$to = "sales@my_client.com";
$subject = "More Information Request";
$FromName = $cs_contact->contact_name->GetValue();

$body = "<br>\nYou have received a new Contact Request\n\n<br>";
$body .= "<br>Below is the information from the Contact Request:\n<br>";
$body .= "\n<br>Contact Name: ".$cs_contact->contact_name->GetValue();"\n<br>";
$body .= "\n<br>Contact Email: ".$cs_contact->contact_email->GetValue();"\n\n<br>";
$body .= "\n<br>Contact Phone: ".$cs_contact->contact_phone->GetValue();"\n\n<br>";
$body .= "\n<br>Contact Phone Ext: ".$cs_contact->contact_phone_ext->GetValue();"\n\n<br>";
$body .= "\n<br>Contact Address: ".$cs_contact->contact_address->GetValue();"\n\n<br>";
$body .= "\n<br>Contact City: ".$cs_contact->contact_city->GetValue();"\n\n<br>";
$body .= "\n<br>Contact State: ".$cs_contact->list_contact_states->GetValue();"\n\n<br>";
$body .= "\n<br>Contact Zip: ".$cs_contact->contact_zip->GetValue();"\n\n<br>";
$body .= "\n<br>Dealer: ".$cs_contact->rb_dealer->GetValue();"\n\n<br>";
$body .= "\n<br>Communication Method: ".$cs_contact->rb_contact_method->GetValue();"\n\n<br>";
$body .= "\n<br>Contact Reason: ".$cs_contact->contact_reason->GetValue();"\n\n<br>";
$body .= "\n<br>Message: ".$cs_contact->contact_message->GetValue();"\n\n<br>";
$body .= "\n<br>";
/*
mail($to, $subject, $body, $from);
*/

$email = new PHPMailer();
$email->From = $from;
$email->FromName = $FromName;
$email->Subject = $subject;
$email->Body = $body;
$AltMsg = strip_tags($body);
$AltMsg = str_replace(" "," ",$AltMsg);
$email->AltBody = $from."\n\n".$AltMsg;
$email->AddAddress($to);
$email->Send();
// -------------------------
//End Custom Code

Any help would be appreciated
View profile  Send private message
saseow

Posts: 744
Posted: 01/23/2013, 2:13 AM

A long shot but it may be that you are putting the code in the wrong event.
Try the OnValidate event.
View profile  Send private message

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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