Contact Form 7 Integration

Posted in

How can I get the referrer information into a Contact Form 7 email?

For example, if user arrives to URL such as this: www.domain.com/form?affiliate=XXX

I assumed I could get the referring affiliate’s information to CF7 by putting something like this in the form tab:


[text* your-name]
[email* your-email]
[text your-subject]
[textarea your-message]

[hidden affiliate_id]

[submit "Send"]

But, the hidden form ends up empty…

How is this supposed to work?

Thanks!

3 Responses to Contact Form 7 Integration

  1. Balazs June 29, 2017 at 3:06 am #

    But I want to pass the referring affiliate information to Contact Form 7 so I can include it in the email it generates, such as the subject line. For example, “Lead form submission generated by affiliate xxx”. Also, I want to use this value in my CF7 mailchimp integration. How can I do this?

    • antonio July 2, 2017 at 5:51 pm #

      Hi Balazs,
      I hope this code can help you (I have not test it, but it should replace [affiliate-id] and [affiliate-username] tokens with their values):
      https://gist.github.com/eggemplo/23da1b83bf0e54f2c878
      You must add it to your functions.php file.
      Regards,
      Antonio B.

  2. antonio June 26, 2017 at 8:58 am #

    Hi Balazs,
    Really you don’t need to add this field. The ‘affiliate_id’ field is needed if you want to allow to customers to select the affiliate.
    From Affiliates->Contact Form 7 you need to set the forms id that generate commissions.
    Kind Regards,
    Antonio B.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share