• Resolved BlackNinjaEntertainment

    (@blackninjaentertainment)


    Sure would be nice if we could choose to rename the .CSV download with a username, date with seconds or something specific to a user….
    /*************************************/
    I had 2 users finish an application with in the same minute and the download crossed the CSV’s and sent wrong data to someone….

    KICK ASS PLUGIN ***** stars

Viewing 1 replies (of 1 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @blackninjaentertainment,

    The FAQ actually has a section about renaming a file, but to make your specific question a bit easier, here is an example.

    You might want to change the filter to gfexcel_renderer_filename_2 to be specific about it only responding on form 2.

    add_filter('gfexcel_renderer_filename', static function ($filename) {
        $user = wp_get_current_user();
        if (!$user->exists()) {
            return $filename;
        }
    
        // return the filename as "user-name-timestamp.<ext>"
        return sanitize_title(sprintf('%s-%s', $user->display_name, time()));
    });

    Hope this helps you out.

Viewing 1 replies (of 1 total)
  • The topic ‘Renaming’ is closed to new replies.