Click this link to set cookie

Click this link to return to the page without the parameter in the URL.

Cookie is set when value shows below:

MyAgent Cookie = Null

Once the cookie exists then these Dynamic Shortcodes (widget from dynamic.ooo) sets the other 3 parameters which are displayed below. These parameters are retrieved from another page (agent page) with the same ID as the cookie.

{set:agent_name {post:title@id={cookie:myagent}}}

{set:agent_phone {acf:mobile_phone@id={cookie:myagent}}}

{set:agent_email {acf:email_address@id={cookie:myagent}}}

To demonstrate that the parameters are set on the page, these three shortcodes are getting the parameters and displaying them below on the page.

{get:agent_name}

{get:agent_phone}

{get:agent_email}

agent_name= Null

agent_email= Null

agent_phone= Null

The Gravity form below is set to allow those 3 fields to be dynamically populated. When the cookie exists it is successfully pre-populating the Agent Cookie ID field, but the other 3 parameters (name, email, phone) are not pre-populating their respective fields. So, the form is recognizing the cookie, but not the other 3 parameters. We know the parameters exist because they are being displayed above. Here is an image of the form field so you can see it is set to dynamically populate.

Test Form - Prepopulate Agent Info

Test form for MyAgent Cookie, URL Parameters and prepopulating form with agent data

Name(Required)

The fields below should be pre-populated dynamically when a cookie exists.

Hidden
This field is for validation purposes and should be left unchanged.