Home › Forums › Gravity Forms Directory & Addons › iContact Gravity Forms – Dynamically Select Custom Fields in iContact
This topic contains 0 replies, has 1 voice, and was last updated by cquinndesign 7 months, 1 week ago.
-
AuthorPosts
-
October 18, 2012 at 12:57 pm #5131
Okay, so here is my situation:
The client has iContact Enterprise account. They have a pretty large website that has newsletter subscription forms all over it. In their iContact account they also have dozens and dozens of contact lists and custom fields. The way they want this done, is the way they want it done, there is no compromise (believe me, I tried) and there is nothing wrong with that…
So what they want to do is use iContact Custom Fields to track where someone has signed up for their newsletter. For instance, if a visitor lands on Page A and subscribes to the newsletter, when you go into iContact and view that subscriber, there should be a checkbox in custom field named “Page A”.
I would like all of this to be done dynamically by tracking the custom field that was inputed in WordPress, which also is the same name of the custom field defined in iContact so that I don’t have to create a subscribe widget for each and every page, because there is so many of them.
What is done:
1) All the custom fields are already created for every single page (there are dozens of them).
2) Gravity forms is installed as well as the iContact Plugin for Gravity Forms.
3) Every page the client wants to track has a “Post Meta” tag in it with the iContact Custom Field it corresponds with.
A) Example -
Wordpress Page “A” has custom field “name = icontact-custom-field” and “value = page-a” – everything conforms to the iContact rules for custom fields.4) Gravity forms has been setup with a “hidden field” called “source” in which this field is correctly displaying the get_post_meta() properly in the value portion of the field.
This is the code I used to do that -
/* Gravity Forms iContact Tracking */
add_filter(‘gform_field_value_source’, ‘populate_source’);
function populate_source($value)
global $post;
$isource = get_post_meta($post->ID, ‘icontact-custom-field’, true);
return $isource;What I can’t figure out -
1) How do I pass this wordpress custom field to iContact so that the checkbox custom field is checked according to what the post meta custom field is in wordpress?
Thank you!
-
AuthorPosts
You must be logged in to reply to this topic.
