WordPress.org

Ready to get started?Download WordPress

Forums

Gravity forms after submission pagination problem (1 post)

  1. teolives
    Member
    Posted 2 years ago #

    Hi there,

    any hint why this code is working with Gravityforms WITHOUT pagination but is not WITH pagination?

    I'm trying to save the uploaded file in another directory adding some info to it:

    add_action("gform_after_submission", "change_file_name", 10, 2);
    function change_file_name($entry, $form){
    
        global $current_user;
        $time = current_time( 'mysql' );
        $y = substr( $time, 0, 4 );
        $m = substr( $time, 5, 2 );
        $current_path = "/path/" . $form["id"] . "-" . wp_hash($form["id"]) . "/$y/$m/";
        $copy_path = "/copypath/" . $form["id"] . "-" . wp_hash($form["id"]) . "/copied/";
        $current_file_1 = ($current_path . $_FILES[input_1]["name"] );
        get_currentuserinfo();
        copy($current_file_1, $copy_path . $current_user->display_name . "-" . $current_user->user_email ."-" . $_FILES[input_1]["name"]);
    
    }

Topic Closed

This topic has been closed to new replies.

About this Topic