following this article:
http://techslides.com/editing-gravity-forms-entries-on-the-front-end
trying to get gravity forms to update a submission rather than create a new one.
problem is that in the
/* https://www.gravityhelp.com/documentation/article/gform_pre_submission */
add_action("gform_pre_submission", "pre_submission_handler");
function pre_submission_handler($form){
if ( strpos($_SERVER['REQUEST_URI'], 'application-edit', 0) !== false ) {
//Get original entry id
parse_str($_SERVER['QUERY_STRING']); //will be stored in $entry
//get the actual entry we want to edit
$editentry = GFAPI::get_entry($entry);
//make changes to it from new values in $_POST, this shows only the first field update
$editentry[1]=$_POST['input_1'];
//update it
$updateit = GFAPI::update_entry($editentry);
header("Location: http://yourdomain.com/apply/application-thank-you/");
//dont process and create new entry
die();
}
}
section of the code, the header redirect is not functioning. Any suggestions?