Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions experimental/gpepee-conditional-edit.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<?php
/**
* Gravity Perks // Easy Passthrough Edit Entry // Conditional Edit
* https://gravitywiz.com/edit-gravity-forms-entries-on-the-front-end/
*
* Create a field on your form and check for a specific value on that field to determine if the passed
* through entry should be edited or if a new entry should be created.
* We're no longer using the experimental folder for experimental snippets. 🚧
* You can now find the snippet here:
* https://github.com/gravitywiz/snippet-library/blob/master/gp-easy-passthrough/gpepee-conditional-edit.php
*/
// Update "123" to the form you are using to edit entries.
add_filter( 'gpepee_edit_entry_id_123', function( $update_entry_id, $form_id ) {
// Update "4" to the field ID you want to check the value of.
if ( rgpost( 'input_4' ) === 'Add New' ) {
$update_entry_id = false;
}
return $update_entry_id;
}, 10, 2 );
Loading