Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Gravity Forms Integration with the Affiliate Platform Plugin

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate F.A.Q/Instructions › Gravity Forms Integration with the Affiliate Platform Plugin

Tagged: Gravity Forms, wufoo

  • This topic has 6 replies, 5 voices, and was last updated 10 years, 9 months ago by admin.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • November 5, 2010 at 3:43 pm #2173
    axellonline
    Member

    I use http://www.gravityforms.com/ to collect my data. Is it possible to use Gravity forms to capture leads just like you have with Contact Form 7?

    Thanks again for your help. You are the best…I really do mean that..

    Ed

    November 6, 2010 at 1:06 am #26158
    amin007
    Participant

    Essentially it is a contact form plugin so it should be doable but because gravity forms is a premium plugin we can’t just start hacking that plugin.

    We just need a hook that allows us to execute a bit of PHP code after the “Submit” button is clicked on the form. Maybe Gravity forms has an option to do this.

    Can you please ask the gravity form guys if they have an option where we can add an action or hook so that when the “Submit” button is clicked on the form it will send us the submitted info to our action function? This will allow us to capture the lead after someone hits the “submit” button on the contact form.

    November 8, 2010 at 1:07 am #26159
    axellonline
    Member

    Thanks. I will ask.

    November 16, 2010 at 11:46 am #26160
    westcoweb
    Member

    Hi I have just posted this on the GF forum as well; please give the following solution a try.

    a) The GF form needs a minimum of three required fields:

    e-mail address for the lead

    hidden field to capture client IP

    hidden field to capture unique id capable of being dynamically populated (I called mine unique_id)

    b) Shortcut to invoke form and pass unique id (in case you want to call form from multiple places on your website)

    [gravityform id=12 title=false description=false field_values=’unique_id=1′]

    c) Following code to go into functions.php – replace form id with your GF form reference number and field numbers for the three $_POST’s.

    // November 2010 MJB - Add For Gravity Forms Post Submission
    function gf_post_submission($entry, $form){
    // Only Execute For Form 12 - Lead Capture
    if($form['id'] != 12) return $form;
    //Check For Presence Of Cookie ap_id
    $aff_id = $_COOKIE['ap_id'];
    if(!empty($aff_id))
    {
    // Build Lead Table Entries
    $reference = $_POST["input_14"]; //Unique ID
    $clientdate = (date ("Y-m-d"));
    $clienttime = (date ("H:i:s"));
    $buyer_email = $_POST["input_3"]; //Email
    $ipaddress = $_POST["input_12"]; // Client IP Address
    global $wpdb;
    $affiliates_leads_table_name = $wpdb->prefix . "affiliates_leads_tbl";
    $updatedb = "INSERT INTO $affiliates_leads_table_name (buyer_email,refid,reference,date,time,ipaddress) VALUES ('$buyer_email','$aff_id','$reference','$clientdate','$clienttime','$ipaddress')";
    $results = $wpdb->query($updatedb);
    }
    }
    add_action("gform_post_submission", "gf_post_submission", 10, 2);
    // End Addition For Gravity Forms

    Tested this morning and works for me…adding entries into the GF form and wp-affiliates Lead Gen table.

    Michael.

    November 17, 2010 at 2:01 am #26161
    amin007
    Participant

    Thank you for posting the solution Michael.

    June 24, 2012 at 5:54 pm #26162
    sarnorealroi
    Member

    hi we have our own contact plugin – which we can add php code to send the lead to your affiliate code. Can you elaborate on what we need to do?

    Thank You

    June 24, 2012 at 11:44 pm #26163
    admin
    Keymaster

    You posted the same question on another thread here:

    https://support.tipsandtricks-hq.com/forums/topic/clicks-tracked-commissions-paid-only-by-cookie-and-not-by-email

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ