This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Exporting xls or csv w/o prefix


  1. dveiga
    Member

    I'm trying to export xls or csv in the forms and when I do that, it only exports the filename as "xls" or "csv" - just the extension. It doesn't contain anything like machform1.xls

    Any reason why, or how to fix it?

    Posted 14 years ago #
  2. redityo

    It might be your form has no title, if so, try to edit your "export_entries.php" file and go to around line 146 ~ 147 for these code :

    $clean_form_name = ereg_replace("[^a-zA-Z0-9_-]", "",$form_name);
    $workbook->send("{$clean_form_name}.xls");

    and change it to

    $clean_form_name = ereg_replace("[^a-zA-Z0-9_-]", "",$form_name);
    
    if ($clean_form_name == '') {
    	$clean_form_name = 'machform';
    }
    $workbook->send("{$clean_form_name}.xls");

    then go to line 174 for this code

    $clean_form_name = ereg_replace("[^a-zA-Z0-9_-]", "",$form_name);

    then replace it with

    $clean_form_name = ereg_replace("[^a-zA-Z0-9_-]", "",$form_name);
    if ($clean_form_name == '') {
    	$clean_form_name = 'machform';
    }

    that would give "machform" as the file name if you've empty form title


    MachForm Support

    Posted 14 years ago #

RSS feed for this topic

Reply