+ Reply to Thread
Results 1 to 8 of 8

Thread: Make individual CSV files or batch results together?

  1. #1
    Join Date
    Mar 2011
    Posts
    28

    Default Make individual CSV files or batch results together?

    I've been using your forms for a while. And I'm very happy with the CSV output created from the php forms. The way it's working now is that each form creates another formdata.csv file in a directory I have specified, but each time someone fills out a new form, it overwrites to a new file. Is there a way to have the form create a sequentially numbered file like formdata.csv, formdata_1.scv, formdata_2.csv, etc? Or if that won't work, to have the form write to the same file and just add new rows?

    Thanks,
    Bob

  2. #2
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Make individual CSV files or batch results together?

    writing to the same file appending rows is the normal way formmail does this

    u specify the csv file in a hidden field called "csvfile"

    so, if u have it writing to different files, u must have done a bit of work to get that done.

  3. #3
    Join Date
    Mar 2011
    Posts
    28

    Default Re: Make individual CSV files or batch results together?

    sorry I don't think I explained myself clearly. each form submission is overwriting the same file. It's NOT creating a new file or appending the original file with new form data. I'm looking for a solution that the form WILL create a new file each time or if it can add data to the csv file, not replace the original data.

    does this make sense?

    Thanks,
    Bob

  4. #4
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: Make individual CSV files or batch results together?

    Hi,

    FormMail always appends to the CSV file specified in the "csvfile" hidden field.

    If it's doing something different to that, then either the code (i.e. the logic of FormMail) has been changed or there's a fault in the operation of PHP on your particular server.

    If you want us to look into it, we offer guaranteed support.

    Otherwise, save your current copy of FormMail and use the free Upgrade Wizard to get the latest version and see if that fixes the problem.

    It rarely makes sense to create a fresh CSV file for each form submission, so unless you have a good reason for that, the default operation of appending to the one CSV file is the way you want to go.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Mar 2011
    Posts
    28

    Default Re: Make individual CSV files or batch results together?

    Thanks Russel. So when you say append, does that mean it's supposed to overwrite the fields or add new entries below the existing fields?

    Thanks,
    Bob

  6. #6
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: Make individual CSV files or batch results together?

    Hi,

    If you think of a CSV file as a spreadsheet or a database, then the columns are the fields on the form and the rows are the form submissions.

    Each form submission appends one row to the file.

    BTW, this also means you must not use the same CSV file for different forms (i.e. where the fields are completely different).
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Mar 2011
    Posts
    28

    Default Re: Make individual CSV files or batch results together?

    I may have found the culprit with the script. Would this be causing the rewrite? It is in the .php script that came with the tectite form.

    Code:
    /* Help: http://www.tectite.com/fmdoc/file_overwrite.php */define("FILE_OVERWRITE",true);

  8. #8
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: Make individual CSV files or batch results together?

    Hi,

    No, that's to do with uploading files to the server.

    It has no effect on CSV files.
    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. make it a number
    By longmuir in forum Community Support
    Replies: 3
    Last Post: 24-Feb-2011, 05:05 AM
  2. Can't make it work?
    By dmitryseliv in forum Community Support
    Replies: 1
    Last Post: 08-Oct-2010, 07:39 PM
  3. Can't make templates work
    By elongman in forum Community Support
    Replies: 1
    Last Post: 20-Oct-2008, 10:04 PM
  4. Replies: 0
    Last Post: 16-Jun-2008, 08:55 AM
  5. Replies: 2
    Last Post: 23-Feb-2007, 05:46 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