Skip to main content

Hi,

 

Hopefully someone knows what's going on here :)

I've embedded my typeform on a webpage. https://www.bever.nl/services/bever-koopt-terug.html

My end screens have a button ‘Start over’ which leads to the embedded form

 

The first time it works perfectly, it reloads the form in the iframe and there you are. 

However, if you fill out the form a second time and use the button again, it leads to a different URL:

https://9zsfh4wfry0.typeform.com/BKTV2?typeform-source=9zsfh4wfry0.typeform.com

It opens in the parent tab, not in the iframe. It only does that the second time. I have no clue why this happens. The expected behaviour is that it again reloads the form in the iframe like it does the first time. Who knows how to achieve this?

Thanks for helping out :)

Best

Frederique

Oh, that’s odd (and interesting), @Friekje . @mathio do you happen to have any idea what’s happening here? 


Hello @Friekje 

you will need to use data-tf-redirect-target option in your embed code, like this:

<div data-tf-live="01JAYW7RP15BT8ZNC79NTZZ70M" data-tf-redirect-target="_self"></div><script src="https://embed.typeform.com/next/embed.js"></script>

This should keep the redirect inside your iframe.

 

Without the setting it will redirect in “parent frame”. The reason why it looks like it redirects correctly for the first time is, is that you have the embed code inside an additional iframe in your page. Your page builder most likely does this to sandbox the embed code - please note that this might prevent you from using some embed feature like reading URL query params or other advanced integrations.


Thanks so much for your help, @mathio ! Let us know how this goes for you, @Friekje 


Thanks, I'll check it this week!


Works like a charm! Thanks :)


Reply