Created
January 10, 2020 22:02
-
-
Save scyt/f81d25b23fd0e283c077d554f520db7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Edit Entry | |
* | |
* Edit entry ID specified in field with current form submission. | |
* | |
* @version 1.0 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/... | |
* @copyright 2019 Gravity Wiz | |
*/ | |
// Update "123" with your form ID; Update "456" with your field ID. | |
add_filter( 'gform_entry_id_pre_save_lead_123', 'my_update_entry_on_form_submission', 10, 2 ); | |
function my_update_entry_on_form_submission( $entry_id, $form ) { | |
$update_entry_id = rgpost( 'input_456' ); | |
return $update_entry_id ? $update_entry_id : $entry_id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment