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

    (@anusuyafurphy)

    Hi,

    Am getting gravity form values stored in custom mysql table for client purposes.Please let me know how to get the value of upload file in functions.php.

    For gravity forms, the following code is used.

    add_action(“gform_after_submission_1”, “push_fields”, 10, 2);

    function push_fields($entry, $form){

    print_r($entry);

    }

    Pls advise.

    Plugin Author ben.moody

    (@benmoody)

    Hi

    Here is the action call after files have been processed and added to the media library

    do_action( ‘prso_gform_pluploader_save_uploads_end’, $entry, $form, $wp_attachment_data );

    so your would do something like:

    add_action( ‘prso_gform_pluploader_save_uploads_end’, ‘process_uploads_function’ );

    function process_uploads_function( $entry, $form, $wp_attachment_data ) {

    //you can now detect $form or $entry params then manipulate the $wp_attachment_data array which contains the field_id as the key and the file’s attachment id as the value (this is the attachment id of the file in wp media library)

    }

    Thread Starter anusuyafurphy

    (@anusuyafurphy)

    Hi Ben,

    Thanks for your reply.

    add_action(“gform_after_submission_1”, “push_fields”, 10, 2);

    function push_fields($entry, $form){
    print_r($entry);
    }

    Can I use in the same function? If I use the function I am getting error.

    Warning: Missing argument 2 for process_uploads_function() in C:\xampp\htdocs\maxxis\wp-content\themes\maxxis\functions.php on line 335

    Warning: Missing argument 3 for process_uploads_function() in C:\xampp\htdocs\maxxis\wp-content\themes\maxxis\functions.php on line 335

    I need to get all the entry details with the uploaded data. It would be great if you provide example.

    Pls advise.

    Thank you

    Plugin Author ben.moody

    (@benmoody)

    you will need to add the priority and number of params to the add ation call:

    add_action( ‘prso_gform_pluploader_save_uploads_end’, ‘process_uploads_function’, 10, 3 );

    Not the 10, 3 i added to the action call

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting Upload Files in front end’ is closed to new replies.