Hi there,
We’re trying to pass the post ID into an entry in our Constant Contact list. We want to be able to email people back at a later time with a link to their post which we will accomplish using website.com/?p={postID}. We already have the post id going into a custom field in the newly created post using the gform_after_submission hook.
Since there is no post ID at the time the form is viewed, we can’t enter that information into a field as a default value and it must be entered using a hook after submission.
The issue we're having though (I think) is that the entry information is sent to Constant Contact before our gform_after_submission function is called.
Here's the code we have in functions.php:
add_action('gform_after_submission_7', 'save_post_id', 100, 2);
function save_post_id($entry, $form){ update_post_meta($entry['post_id'], 'pledge_id', $entry['post_id']);
}
I hope I was clear enough on what we’re trying to do. If not, please let me know.
Gravity Forms Version
1.9.19
Installed Add-Ons
Name Version
gravity-forms-post-updates 1.2.23
gravity-forms-custom-post-types 3.1.3
gravity-forms-constant-contact 2.2.2
WordPress Version
4.4.2
Thanks in advance for your help!
/Bradley
(originally posted in a sticky thread on "How to post here"...oops!)
https://wordpress.org/plugins/gravity-forms-constant-contact/
WordPress ...
ما را در سایت WordPress دنبال می کنید
برچسب : نویسنده : استخدام کار wpss بازدید : 251 تاريخ : جمعه 31 ارديبهشت 1395 ساعت: 0:17