Contact Form 7 Integration

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!


Comments

3 responses to “Contact Form 7 Integration”

  1. 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?

    1. antonio Avatar
      antonio

      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 Avatar

    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.

Share