We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gpepee-conditional-edit.php
experimental
1 parent e21b59b commit 7b4b3c5Copy full SHA for 7b4b3c5
gp-easy-passthrough/gpepee-conditional-edit.php
@@ -0,0 +1,18 @@
1
+<?php
2
+/**
3
+ * Gravity Perks // Easy Passthrough Edit Entry // Conditional Edit
4
+ * https://gravitywiz.com/edit-gravity-forms-entries-on-the-front-end/
5
+ *
6
+ * Experimental Snippet 🧪
7
8
+ * Create a field on your form and check for a specific value on that field to determine if the passed
9
+ * through entry should be edited or if a new entry should be created.
10
+ */
11
+// Update "123" to the form you are using to edit entries.
12
+add_filter( 'gpepee_edit_entry_id_123', function( $update_entry_id, $form_id ) {
13
+ // Update "4" to the field ID you want to check the value of.
14
+ if ( rgpost( 'input_4' ) === 'Add New' ) {
15
+ $update_entry_id = false;
16
+ }
17
+ return $update_entry_id;
18
+}, 10, 2 );
0 commit comments