Hello Community,
I am in need of building a partner/referral page. Some requisites needed
Resources
Thanks
Solved! Go to Solution.
On a referral form, you don’t have to actually remove the cookie from the browser’s cookie store.
In fact, you specifically don’t want to remove the cookie permanently, because the person filling out the form (the referrer) is also a lead in your db, and their own activity is still interesting. What you want to do is make sure the referral lead‘s record doesn’t take over the session.
So you have to remove the cookie from the form post, which is what the code in that blog post is designed to do. Taking advantage of a known quirk in the forms library, it empties the hidden field that normally holds the cookie when the form is submitted; the cookie in the browser isn’t touched.
On a referral form, you don’t have to actually remove the cookie from the browser’s cookie store.
In fact, you specifically don’t want to remove the cookie permanently, because the person filling out the form (the referrer) is also a lead in your db, and their own activity is still interesting. What you want to do is make sure the referral lead‘s record doesn’t take over the session.
So you have to remove the cookie from the form post, which is what the code in that blog post is designed to do. Taking advantage of a known quirk in the forms library, it empties the hidden field that normally holds the cookie when the form is submitted; the cookie in the browser isn’t touched.