Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/entry-ids
- // update the 93 here to your form ID
- add_action('gform_after_submission_93', 'add_submission_id', 10, 2);
- function add_submission_id($entry, $form) {
- global $wpdb;
- // update this to the number of the hidden field in your form
- $field_number = 4;
- // your submission ID format to be inserted into the hidden field
- $SubmissionID = 'A' . $entry['id'];
- // update the entry
- $wpdb->insert("{$wpdb->prefix}rg_lead_detail", array(
- 'value' => $SubmissionID,
- 'field_number' => $field_number,
- 'lead_id' => $entry['id'],
- 'form_id' => $entry['form_id']
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement