+ Reply to Thread
Results 1 to 5 of 5

Thread: Carriage return (Enter) in text boxes gives extra line in CSV file

  1. #1
    Join Date
    Feb 2008
    Location
    Harwich, UK
    Posts
    9

    Default Carriage return (Enter) in text boxes gives extra line in CSV file

    Two of the fields in my form are multi line text entry boxes. The user often will enter more than one line of text, each line being ended by pressing the carriage return key (Enter). This seems to give an extra line in the CSV file that is sent through.

    Is there a way of substituting the CR with another character [maybe / or ;] to show where the user has entered the CR?

    Thanks...............Ken

  2. #2
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Carriage return (Enter) in text boxes gives extra line in CSV file

    Hi,

    FormMail supports quoting of data in CSV files. In this case, it will quote the field value and preserve the newlines.

    However, the setting called "LIMITED_IMPORT" allows for software like Excel, which doesn't understand quoting in CSV files, and therefore strips the new lines.

    Set LIMITED_IMPORT to false and you'll get your newlines preserved.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Feb 2008
    Location
    Harwich, UK
    Posts
    9

    Default Re: Carriage return (Enter) in text boxes gives extra line in CSV file

    Hi Russell

    I'm not sure I understand this.

    LIMITED_IMPORT was set to true and the carriage returns appeared in the csv file attached to my email.

    I set it to false and there was no difference, the CRs were still there.

    I double checked this twice and the results were the same.

    Ken

  4. #4
    Join Date
    Feb 2008
    Location
    Harwich, UK
    Posts
    9

    Default Re: Carriage return (Enter) in text boxes gives extra line in CSV file

    Hi again,

    I've just looked at the .txt file with the data in on my server. With the setting at true, the CR's dont appear in the file. WIth it set to false, they do appear in the file. However in the .txt file passed through with the email, the CRs appear both times.

    Ken

  5. #5
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Carriage return (Enter) in text boxes gives extra line in CSV file

    Hi,

    That's correct. LIMITED_IMPORT only affects CSV files.

    As I understand your question, this is now working the way you want.

    BTW, the mail_options feature "KeepLines" controls whether new lines are preserved in field values for use in email.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Attaching CSV file
    By eu4ic in forum FormMail Subscription Support
    Replies: 6
    Last Post: 01-Jun-2005, 11:58 PM
  2. Return All Variables To Form Page On Error
    By cornernote in forum FormMail Subscription Support
    Replies: 12
    Last Post: 31-Oct-2004, 10:20 PM
  3. Downloading CSV file in Access
    By jgold723 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 30-Aug-2004, 11:35 AM
  4. Return All Variables To Bad_Form Page On Error
    By vladimir in forum FormMail Subscription Support
    Replies: 2
    Last Post: 07-Jun-2004, 06:13 PM
  5. No return link for badhandler
    By ptr in forum FormMail Subscription Support
    Replies: 3
    Last Post: 27-May-2004, 12:27 AM

Bookmarks

Posting Permissions

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