|
-
Phantom Flasher...
Flash > PHP email form submitting as HTML rather than plain text?
Hi guys,
Strange problem. I have my flash doc setup to submit an email form as a contact on a page.
The text fields are called:
signupname
signupemail
signupmobile
They are in a movieclip called theform, when the send button is pressed it sends the form to email.php
Code:
on (release) {
theform.loadVariables("email.php", "POST");
}
The PHP file then sends an email to me with the details.
The details are coming through as HTML rather than plain text. Is there a way for me to strip out the html from the text boxes, either in flash or in php?
Currently the emails I get off the form look like:
Code:
Details: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">Mark</FONT></P></TEXTFORMAT>, <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">[email protected]</FONT></P></TEXTFORMAT>, <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">07781545455</FONT></P></TEXTFORMAT>
When it should read:
I've tried setting the text boxes in flash with this code:
Code:
_root.theform.signupname.text = "";
_root.theform.signupemail.text = "";
_root.theform.signupmobile.text = "";
stop();
And also using striptags() in php, but nothing seems to work 
Some help would be great! Thanks chaps!
-
Hi,
switch to loadvars object from loadvariables().
You will have to change from variable names to instance names for the text fields
Musicman
-
Phantom Flasher...
Hi MM, thanks for the reply!
Do you mean loadVariablesNum, as I can't find a loadvars in AS2?
Thanks,
Mark
-
Bearded (M|G)od
LoadVars
But that's not going to solve your problem. You have HTML enabled on that text field. Check your property panel for the box with <>. It's probably pressed.
-
Phantom Flasher...
-
Hi,
to clarify things: in the old days (certainly until flash 7), a text field variable would render html only if html was enabled for the text box. Later (not sure whether it was flash 8 or 9), there were a couple of posts that text variables would alwasy return html.
Now, with loadvars, you no longer use the text field variable but rather assign an instance name to a text field ... and now you can choose between the .text and .htmlText
Musicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|