Hello @Austin! It's great to have you here!
I'm not sure if you can do that, so I'm tagging @mathio over here because he might be able to help you with that! Any thought on that?
Good luck!
Hello @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
Thanks, @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.
Hello @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 data-tf-redirect-target=”_self”
(or redirectTarget: “self”
for JS embed code) in your embed code.
Hello @mathio ,
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
Hi @midiazmartinez
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):
?typeform-embed-redirect-target=_self
See all available values in the embed docs.
@mathio
Thanks for the answer, but I don't understand.
I explain what I have:
import { createWidget } from '@typeform/embed';
createWidget('FIRST_TYPEFORM', {
container: document.querySelector('#survey-typeform'),
iframeProps: {
title: 'Title survey',
id: 'survey-typeform-iframe'
},
redirectTarget: '_self',
onReady: this.onReadyWidget,
onSubmit: this.onSubmitWidget
});
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.
@mathio Thank you very much, I have already tested it and it works perfectly
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!
Hello,
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?
Thanks
Hello,
I’m hoping someone will be able to assist me with this. I am attempting to use a Typeform as an iFrame within Framer, and I am using a URL redirect at the last page. The Typeform appears beautiful in Framer, but the redirect does not stay within the iFrame.
I have attempted to follow these instructions, but the redirect still gets the user out of the iframe. Does anyone have thoughts on what I’m doing wrong? Below is the HTML embed code I’m using within framer. Adding the data-tf-redirect-target=”_self” doesn’t seem to do anything. Thanks so much!
<div data-tf-live="01H7JP27FDKY9RTYVRYR73HRA8" data-tf-redirect-target=”_self”></div>
<script src="//embed.typeform.com/next/embed.js"></script>