Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cbubny

    (@cbubny)

    just to be clear, all field names are displaying as column’s in my csv file. it’s just that all of them, except two are empty.

    Thread Starter cbubny

    (@cbubny)

    I’m curious if the issue is related to checkboxes. The export entries work fine with other forms but the form i need to export entries from, has two sets of checkboxes options and it seems like those fields are breaking the csv export.

    Plugin Contributor David Cramer

    (@desertsnowman)

    sounds like its an export problem on the checkboxes. I’ll make a note and try get it tested and sorted.

    vtq

    (@virtiqa)

    Hi Guys,

    I think I ran into this issue just recently, had a stressed client unable to see all fields in a CSV export.

    I had to jump in and fix it myself.

    PHP Jargon:
    it’s to do with trying to access the first value in an array by assuming it has numerical keys (for checkboxes this is not the case).

    I have adjusted the code so it can handle arrays with both numerical keys or other types of keys.

    In the file classes/admin.php

    Line 1434
    $row[$key] = $row[$key][0];

    Will not work for some checkboxes (when only one value is ticked) because it is an associative array not a numerical one.

    So, to work in all cases, replace that line with the following:

    reset($row[$key]);
    $sub_arr_key = key($row[$key]);
    $row[$key] = $row[$key][$sub_arr_key];

    David, it would be great if you can include this in the next release, just so we don’t clobber my fix when we update the plugin!

    Love caldera forms, thanks for making such an awesome plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSV fields not populating’ is closed to new replies.