I’m hoping someone can shed some light on an issue I’m having.
I have a Typeform embedded on a site (form A) that uses redirect on completion to send the user to another typeform (form B). On form B, there are two endings. One is a true ending with no link, and one uses a button (not the redirect on completion feature) to lead back to the start of form B, passing a hidden field.
Is it possible to do what I am trying to do?
Here’s a summary of the situation:
Embedded form A redirects to form B
When form A ends the redirect opens in the parent window and not within the iframe.
The entire form sequence remains within the iframe.
Attempts at a solution
|Full page embed code from the share menu||Redirect from form A opens in parent window|
|Standard embed code from the share menu||Redirect from form A opens in parent window|
|iframe using Typeform url||Redirect from form A opens in parent window|
|Nested iframes (embedding a second site that contains only a Typeform embed, with and without sandbox attributes).|| |
Various console errors
Best answer by mathioView original
@Austin! It's great to have you here! @mathio over here because he might be able to help you with that! Any thought on that?
I'm not sure if you can do that, so I'm tagging
@Austin and @Gabi Amaral ,
As far as I am aware we always redirect the parent (host) page of the embedded typeform.
However I like the idea of configuring where to redirect. Do you think this setting should be part of the embed snippet (an attribute) or it should be a setting in builder when setting up the redirect? To me it makes more sense to be part of embed code to be configurable for each embed separately.
Would you mind posting this feature request on our Github? https://github.com/Typeform/embed/issues
@Gabi Amaral and @mathio! It’s good to know I wasn’t missing something obvious. I agree, I think the best case would be an embed attribute so that it can be configured as needed. I’ll post on Github.
Hi y’all, was this solved?
@mathio do you have an update perhaps? We’re looking to use the same feature.
@mmathieu if I remember correctly we never received a feature request on Github therefore this feature is not available. Feel free to post it on Github so our team can track this feature request.
Hello all, this feature was released today. See embed README file for details.
To keep the redirect in iframe yo can use
redirectTarget: “self”for JS embed code) in your embed code.
I have more than two Typeform it doesn't work. When it goes from the second to the third it already opens in the parent.
The redirect from the first to the second works perfectly, but the next redirects don't work
The redirect target is determined via a query parameter passed to your typeform at embed time. You can add this query param to the 2nd typeform URL manually (to the redirect URL when creating the form):
See all available values in the embed docs.
Thanks for the answer, but I don't understand.
I explain what I have:
I only create the first form and then the redirect embeds the rest of the blocks when they finish
When you build your typeform (in “Create” tab) you specify the redirect URL. You need to add the query param to specify redirect target there.
Happy it's working now,
@midiazmartinez! By the way, why don't you share these forms with us so we can test on our end? We'd also love to take a look at them so we can give you some feedback! 😉
I write again because the problem is now another.
The problem is that the onSubmit event is only fired the first time in the first form, in the second and third the onSubmit event is not fired and it is not possible to have control of the onSubmit event.
I need to retrieve the response_id of each form.
Any idea what could be happening or is it a bug?