We're experiencing an issue when we embed a form into a custom HTML page. After submitting and reloading the page, we'd like the form to show the Known Visitor HTML as a 'thank you' message for submitting the form.
Instead, the page refreshes and the form is displayed as normal. The Known Visitor HTML is not shown. However, if we refresh the page a couple of times, THEN the Known Visitor HTML shows up.
We also have a simple demo of an embedded form that shows this behavior:
http://burkett.in/marketotest.html
There are no other scripts or anything else loading on this page. Is it not possible to use the KV HTML as a thank you message as we're attempting?
It's not possible to rely on the KV HTML displaying on the immediately following page view.
The Munchkin cookie is associated with the lead asynchronously, i.e. in the background. That process is not guaranteed to complete by the time the next page draws. It will typically (though not always) finish within the next few seconds.
Ok, thank you -- This is the alternate route we were exploring. I assume you're referring to using the Javascript Forms API's onSuccess handler to show a custom message on the page?
That is what Jay is referring to, yes.
thanks!
After submitting and reloading the page
You can set it so the page doesn't reload after form submission and then hide/replace the form with the 'thank you' message you want. Then if the person comes back to the page the KV html will kick in