Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
jsolo2001 #1
Flash Form - Processing with PHP problem
I'm processing my Flash Form by sending the form to a PHP script. The script
then emails the form's variables to me, but when I get my form through the
email, I get these obtrusive variables with information I don't want and makes
the information hard to find. Here's a couple of examples of the variables
I've recieved.
Name: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times\"
SIZE=\"14\" COLOR=\"#333333\" LETTERSPACING=\"0\" KERNING=\"0\">Monkey
Test</FONT></P></TEXTFORMAT>
Email: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times\"
SIZE=\"14\" COLOR=\"#333333\" LETTERSPACING=\"0\"
KERNING=\"0\">monkey@monkey</FONT></P></TEXTFORMAT>
I've included my PHP script in case that's the problem, but the script works
perfectly fine in a HTML form. Any help or suggestions would be greatly
appreciated, thanks.
<?php
$sendTo = "nada@nada.com";
$subject = "Nada Form";
$name=$_POST['nameField'];
$email=$_POST['emailField'];
$phone=$_POST['phoneField'];
$fax=$_POST['faxField'];
$address=$_POST['addressField'];
$message=$_POST['messageField'];
$name=trim($name);
$email=trim($email);
$phone=trim($phone);
$fax=trim($fax);
$address=stripslashes($address);
$message=stripslashes($message);
$fullMessage = "Name: ".$name."\nEmail: ".$email."\nPhone: ".$phone."\nFax:
".$fax."\nAddress: ".$address."\nMessage: ".$message;
$headers .= "Reply-To: " . $_POST["emailField"] . "\r\n";
$headers .= "Return-path: " . $_POST["emailField"];
mail($sendTo, $subject, $fullMessage);
?>
jsolo2001 Guest
-
DW MX - Extension for Form Processing?
Hello, I'm back on DW MX after a break from it. And in a way, I'm addressing here the crux of why I had to go back to Frontpage for a while. In... -
Form Processing Applications
I have not had much experience with forms processing, but need to build one for a site. I saw a link to Kmita-mail (http://www1.kmita-mail.com/)... -
Secure Form processing
After a user clicks the submit button on an order form, I am unable to get the redirect specified in the form to go to a secure page. This causes... -
Form Processing
Hi, I am designing a basic email form using Dreamweaver and the checks are successful. Does Dreamweaver have any functionality to enable me to... -
More form processing
Hey folks, I need some of your expertiese again. I am creating a survey form and need some help gathering the results of a question that has... -
Raymond Basque #2
Re: Flash Form - Processing with PHP problem
Looks like you're posting TextField.htmlText instead of TextField.text
Raymond Basque Guest
-
amagen #3
Re: Flash Form - Processing with PHP problem
I a having the same problem. RB,will you please expound on your response? Thank you
amagen Guest
-
jsolo2001 #4
Re: Flash Form - Processing with PHP problem
Hey guys, glad to know that other people have encountered the same problem!
Raymond I looked up TextField.html in the help section in Flash, it came up but
I'm not sure how to incorporate this into my action script. Here's the example
I found, would something along these lines be all the Actionscript I need?
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 400, 22);
my_txt.html = true;
Thanks
jsolo2001 Guest
-
Raymond Basque #5
Re: Flash Form - Processing with PHP problem
You need to make sure your form submission sends the plain text value of the
TextField. You do not want to send TextField.htmlText if the html property
is set to true.
Here's a simple example of what happens when you set TextField.html to true
and get the htmlText value.
var tf:TextField =
this.createTextField("my_txt",
this.getNextHighestDepth(),
10, 10, 400, 22);
tf.text = "Hello World!";
// set html to true
// the htmlText and text properties
// return different values
tf.html = true;
trace(tf.text);
trace(tf.htmlText);
// set html to false
// both htmlText and text properties
// return the same value
tf.html = false;
trace(tf.text);
trace(tf.htmlText);
Raymond Basque Guest
-
jsolo2001 #6
Re: Flash Form - Processing with PHP problem
Thanks for the example Raymond. I tried your script and have a clear idea of
how this text stuff works. The only thing is that I'm not sure how to apply
this to my form. How to send the results from e.g. -
tf.html = false;
- through email, if it's a input field. Here's my code for my submit button,
nothing fancy just gather up the variables and send.
on (release) {
if (nameField eq "" || emailField eq "" || messageField eq "") {
errorBox._x= 120;
} else {
loadVariablesNum("process.php", 0, "POST");
gotoAndStop(2);
}
}
I have a total of 6 input variables - nameField, emailField, messageField,
phoneField, faxField and addressField. What would I have to do to get the
"html=false" results to send. Add more code? If you could provide me with
another example of code for input fields that'd be great. Thanks for your help
again.
jsolo2001 Guest
-
Raymond Basque #7
Re: Flash Form - Processing with PHP problem
OK. I've never used variables attached to TextFields, but a quick test
indicates default behavior to be that if the TextField is set to "Render as
HTML" (TextField.html=true), the variable will be populated with the
htmlText value.
It would seem that the easiest way to change that behavior is to select each
TextField and unselect the property in the properties panel.
Raymond Basque Guest



Reply With Quote

