• Resolved darthluda

    (@darthluda)


    Yes, i know, it should be clear, but i still do not know how to use this extension since i am pretty much a newbie on this, my apologies.

    What i basically want to do is to define the name of the zip file so it contains the content of two fields of whatever form i selected.
    For example, if i want to create a file name from field 1 and field 2 of the given form, which contain “firstname” for fireld 1 and “lastname” for field 2, so the filename would be “fistname_lastname.zip”.

    How do i manage this? I really appreciate any help given!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter darthluda

    (@darthluda)

    Nevermind, i figured it out. If you want to adapt, you can use my code to add to the PHP to define the archive name as well as the folder names inside the archive:

    function my_bdfgf_entry_filename ( $entry_filename, $entry_id, $uploaded_file ) {
    $entry = GFAPI::get_entry( $entry_id );
    $foldername1 = rgar( $entry, 3 );
    $foldername2 = rgar( $entry, 29 );
    $foldername3 = rgar( $entry, 30 );

    // Dies ist der Name der Ordner im Archiv wobei '/' den Unterordner definiert.
    return $foldername1 . '/' . $foldername3 . '_' . $foldername2 . '/' . basename( $uploaded_file );
    }

    add_filter( 'bdfgf_entry_filename', 'my_bdfgf_entry_filename', 10, 3 );

    function my_bdfgf_download_filename( $filename, $form, $entry_id ) {
    $entry = GFAPI::get_entry( $entry_id );
    $foldername1 = rgar( $entry, 3 );
    $foldername2 = rgar( $entry, 29 );
    $foldername3 = rgar( $entry, 30 );

    // Dies ist der Name des Archivs.
    return $foldername1 . '_' . $foldername3 . '_' . $foldername2;
    }

    add_filter( 'bdfgf_download_filename', 'my_bdfgf_download_filename', 10, 3 );

    Plugin Author Torsten H?ndler

    (@shogathu)

    @darthluda

    well, I think what you want is already included in the plugin. So you can set it the name of the folder inside the zip archive and the name of the zip archive at the form settings. There is an option for the Bulk Downloader and you can set the names there, and you can use form entries like firstname or last name from the form

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.