Menu

\n after form field to separate txt reply (?)

Help
Anonymous
2007-04-18
2013-06-03
  • Anonymous

    Anonymous - 2007-04-18

    I just haven't been able to figure out how to not have the multi-line 'address' textarea begin on the same line as the form field in the eMail response.

    I hesitated a long time before putting the site location up here.  The site is nothing more than my very first exercise ever with PHP, and it will only exist a few weeks.

    So I decided to provide the location, maybe it will help someone else with customized form code, customized thankyou code, customized failure code, and maybe it will help someone help me.  (btw, the css doesn't exactly match, I just used it for starters)

    Basically, the only files in this location   >>>>>>   www.iamnowwebservice.net   <<<<<<   are the form itself, associated customized thankyou and customized failure pages which both include linkage directly to this site, ..... plus /process.php (and necessary /global.inc.php) besides the index.html & phpform.

    Thank you in advance for your time ....

             reprieve 

     
    • TNTEverett

      TNTEverett - 2007-04-18

      I can help but I'm not sure what you are looking for.  Can you send me an example of what you don't like and an explanation of what you would like?

       
    • Anonymous

      Anonymous - 2007-04-19

      Hi!   Thanks for your offer to help.   :)

      Here's an example of what I get in the eMail response ~~

      something installed                 : on
      working                             :
      phpformgenerator                    : on
      Name                                : abcdefghi
      Company                             : jklmnopqr
      Preferred Contact Method            : zzzzzzzzz
      Email                               : required
      Daytime Phone Number                : example
      Address                             : testing.  (I did indeed get all the colons to line up). Email is the only field required at the moment.   First 3 are checkboxes, all the rest are text field, except for the last (Address), which is a textarea field.   All responses line up with respective field.   Is it possible would to begin the Address response (after colon) on the next line, and not on the same line?   I've tried different placements of the \n  .... and looked through previous posts in the forum.  What I'm contemplating would look like this:

      Email                                : required
      Daytime Phone Number                : example
      Address:                            :
         so the text response begins on the next line.  Or even skip a line (insert blank line between Address: and response).   Don't know if we can single out a particular form field for this tweak, if not, I'll try \n effect on all form fields.

      Hope this presents well in the post.   Will be back in about an hour ....

       
      • TNTEverett

        TNTEverett - 2007-04-19

        This is possible.
        Look for the line that prints the "address :".  It will look something like this.

        $message="Contact Form: ".$ContactForm."
        Name: ".$Name."
        Address: ".$Address."
        ";

        Change the addres line to this.
        Address: \012".$Address."

         
        • Anonymous

          Anonymous - 2007-04-19

          Good morning!   Just the ticket, thank you!

          Using \012, I found that this:

          Address : \012\012".$Address."
          ";

          gives me a double carriage return (blank line entry) for the initial line of the address textarea response, and this:

          $Address=preg_replace("/(\015\012)|(\015)|(\012)/","\n\n", $Address);

          gives me a double carriage return on all carriage returns.

          Thank you for your service to this forum, I'm learning a lot about php /database, etc. just from reading the posts, and following links which you have provided for further study in context.    With gratitude,

              reprieve

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.