Hello!
I’ve got a typeform that redirects to another typeform after one of the endings. The initial typeform is being loaded with the embed SDK and I’m setting the redirect property to _self.
<div data-tf-redirect-target=_self data-tf-widget="{{formId}}" data-tf-on-submit="submit" id="form" data-tf-hidden="{{hidden}}"></div>
That all works great. When you complete the question that triggers the redirect the next typeform shows just fine! However, I have noticed that the callbacks stop working at this point. I instrumented the page to log all of the postMessage events that are happening and this is the result.
This is the callback output right before the redirect
{
"status": "completed", // I added this to the logging
"event": { // The actual object from the callback
"response_id": "2ey7rf0m0y2bluc2ey7r3wskircxajph",
"responseId": "2ey7rf0m0y2bluc2ey7r3wskircxajph"
}
}
This is the postMessage output of the redirect (I assume it’s being triggered by the SDK?)
{
"type": "redirect-after-submit",
"url": "https://andhealth.typeform.com/s-aienroll",
"embedId": "6854122577713748"
}
And here are the theme and ready events, the embedId is now missing.
{
"type": "form-theme",
"theme": {
"backgroundColor": "rgba(255, 243, 233, 1)",
"color": "#202020"
},
"embedId": null
}
{
"type": "form-ready",
"embedId": null
}
Completing the typeform shows that the event for submission still fires, but the SDK callback doesn’t get called.
{
"type": "form-submit",
"response_id": "a4l8sdb3l7w06ufa4l8ea16jrz28hi8t",
"responseId": "a4l8sdb3l7w06ufa4l8ea16jrz28hi8t",
"embedId": null
}
I could just key off this “form-submit” type to get the response_id, which ultimately is what I am after. But I feel like the missing embed ID and then potentially no callbacks being triggered is a bug and it would be better to rely on the SDK than the underlying implementation of the callbacks.