+ Reply to Thread
Results 1 to 5 of 5

Thread: PHPFormGenerator - textarea - help!!

  1. #1
    Join Date
    Jul 2005
    Posts
    2

    Default PHPFormGenerator - textarea - help!!

    Hi there!

    I have used Phpformgenerator via fantastico/cpanel and is working very well. Emails are being recieved fine, no problems at all.

    Just one minor thing that is annoying me though.

    The message area where customers type their enquiry into - Ie: the Textarea tag.. is sending me the message with wierd code where there are line breaks. In the process.php there is a line of code that has "&nbsp;<br />" in it, which looks like the culprit.

    ---------------------------------------------------------------------------------------------
    Here's the full line of code it came from:

    $Message=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message);if($YourName=="" || $EmailAddress=="" || $Message=="" ){

    ---------------------------------------------------------------------------------------------
    Here's what the Thank You page displayed upon submitting the email:

    just testing this page out to see if it works.

    this is a test line
    so is this line

    123
    123

    123

    123

    ---------------------------------------------------------------------------------------------

    Then here's what I am getting via email - bear in mind it was a test email to myself via my enquiry page.

    Your Name: jack
    Business Name:
    Email Address: jack@jack.com
    Contact Number: 0403 123 456
    Message: just testing this page out to see if it works.&nbsp;<br />&nbsp;<br />this is a test line&nbsp;<br />so is this line&nbsp;<br />&nbsp;<br />123&nbsp;<br />123&nbsp;<br />&nbsp;<br />123&nbsp;<br />&nbsp;<br />123

    Any ideas as to what might be causing those <br /> and &nbsp being inserted into the Message/textarea?

    All replies GREATLY APPRECIATED!!

    Thanks so much,
    Julian

  2. #2
    Join Date
    Oct 2004
    Location
    Florida
    Posts
    2,132

    Default Re: PHPFormGenerator - textarea - help!!

    When the form generator sends you the information entered into a text area, it includes the HTML which is produced by keystrokes.
    &nbsp; = a space
    <br /> = a return

    I don't think you can do anything about it. Just ignore the html.

  3. #3
    Join Date
    Jul 2005
    Posts
    2

    Default Re: PHPFormGenerator - textarea - help!!

    ahh bugger... thanks for your reply

    I was afraid someone was going to say that :P

    Im actually developing an enequiry page for a very good friend to whom I owe a favour to.
    But she hardly knows HTML code, for me it's not a prob to distinguish the HTML and plain text.

    So deinfately no other way to send the textarea text as Plain Text w./out html??

    EDIT: I forgot to let you know that my friend is using outlook express, but when i view the emails in via my webmail no problems - as one would expect. But she doesn't use her webmail service!! arghhh, silly outllook express!!

    Cheers,
    Julian
    Last edited by praet123; 07-01-2005 at 09:13 AM. Reason: forgot some information

  4. #4
    Join Date
    Feb 2005
    Posts
    89

    Default Re: PHPFormGenerator - textarea - help!!

    I have been using the same program and I noticed this too. Kind of annoying but I just left it alone. Another thing that has me stumped is that it won't accomodate multi selects in drop down lists. I thought I noticed this as a bug report in the program. When somebody multi selects I only get a response for the very last one selected.

    does anybody know what this problem might be?

  5. #5
    Join Date
    Mar 2006
    Posts
    4

    Default Re: PHPFormGenerator - textarea - help!!

    Yes, there is a way to stop the html from showing up. In your process.php file, you would need to take out the &nbsp;<br /> out of that code.

    $Message=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message);if($YourName=="" || $EmailAddress=="" || $Message=="" ){

    So it would look like this.

    $Message=preg_replace("/(\015\012)|(\015)|(\012)/","", $Message);if($YourName=="" || $EmailAddress=="" || $Message=="" ){
    Last edited by Joe; 03-25-2006 at 11:07 PM.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts