+ Reply to Thread
Results 1 to 8 of 8

Thread: Checkbox and csv

  1. #1
    Join Date
    Mar 2010
    Posts
    4

    Default Checkbox and csv

    I'm trying to attach the content of the form as an csv file to the email. Everything works well except that the content from a checkbox or multiple select list is not displayed in the attached csv file.
    Here's the code I'm using,
    <input type="hidden" name="filter" value="csv" />
    <input type="hidden" name="filter_fields" value="realname,email,contact,colors[],vehicles[],mesg" />
    <input type="hidden" name="filter_options" value="Attach=data.csv,CSVHeading,CSVQuote=',CSVSep=;, CSVIntSep=:,CSVEscPolicy=double,CSVRaw" />

    everything else is as the standard sampleform.htm.
    Any idea's?

  2. #2
    Join Date
    Jun 2009
    Location
    Houston
    Posts
    378

    Post Re: Checkbox and csv

    Do you have a "value" for each of the checkboxes? They come thru fine on my csv.

  3. #3
    Join Date
    Mar 2010
    Posts
    4

    Default Re: Checkbox and csv

    Yes, I used the standard form which was provided by the distribution for testing purposes. The file includes values as;
    Red <input type="checkbox" name="colors[]" value="red" />
    Blue <input type="checkbox" name="colors[]" value="blue" />
    Yellow <input type="checkbox" name="colors[]" value="yellow" />

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

    Default Re: Checkbox and csv

    u don't want the '[]' here:
    HTML Code:
    <input type="hidden" name="filter_fields"  value="realname,email,contact,colors[],vehicles[],mesg" />
    this is wot u want:
    HTML Code:
    <input type="hidden" name="filter_fields"  value="realname,email,contact,colors,vehicles,mesg" />

  5. #5
    Join Date
    May 2008
    Posts
    1,273

    Default Re: Checkbox and csv

    Hi,

    Try removing the brackets from the checkbox fields in the filter_fields specification; not in the checkbox tag, just in the filter_fields specification.

  6. #6
    Join Date
    Mar 2010
    Posts
    4

    Default Re: Checkbox and csv

    Removed the brackets, but still no colors in de csv file which reads;

    realname,email,contact,colors,vehicles,mesg
    Realname,user@domain.nl,Y,Array,,attempt_01

    Attached I uploaded both files for source..., formmail.php is stripped to meet allowed filesize.
    Attached Files

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

    Default Re: Checkbox and csv

    Hi,

    I think you've hit a bug.

    Please upgrade to version 8.23 as we did find and fix a problem with array values in that version.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  8. #8
    Join Date
    Mar 2010
    Posts
    4

    Default Re: Checkbox and csv

    Just update to 8.23 version which shows multiple checkboxes in csv now.
    Thanks everybody for your support!

+ 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. Checkbox results on newlines
    By liam in forum Community Support
    Replies: 6
    Last Post: 27-Sep-2007, 04:22 PM
  2. Replies: 1
    Last Post: 28-Jul-2007, 02:21 AM
  3. checkbox & CSV file
    By jalea148 in forum Community Support
    Replies: 1
    Last Post: 13-Jun-2006, 07:15 PM
  4. Checkbox problems
    By Harry-Wales in forum Community Support
    Replies: 3
    Last Post: 19-Apr-2006, 05:12 PM
  5. checkbox problem
    By darren777 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 11-Feb-2005, 06:09 PM

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