End screen button to start over opens in Typeform the 2nd time | Community
Skip to main content
Question

End screen button to start over opens in Typeform the 2nd time

  • October 25, 2024
  • 5 replies
  • 40 views

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

5 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14972 replies
  • October 25, 2024

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


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • October 28, 2024

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.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14972 replies
  • October 31, 2024

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


  • Author
  • Explorer
  • 2 replies
  • November 11, 2024

Thanks, I'll check it this week!


  • Author
  • Explorer
  • 2 replies
  • November 19, 2024

Works like a charm! Thanks :)


Reply