Restart a embedded form | Community
Skip to main content
Answered

Restart a embedded form


Hello, I’m embedding a Q&A form on a webpage and I would like users to be able to restart the form to submit a new question without reloading the entire page as the page contains a live stream.
Is there a way to do it? 
Thanks

Best answer by mathio-tf

You can set redirect target for your form to redirect inside the iframe by adding data-tf-redirect-target=”_self” to your embed code (see embed SDK docs).

An alternative would be to handle this inside an onSubmit callback with custom JavaScript implementation (see docs).

View original

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • April 9, 2024

Hi @fab420 Thanks for stopping by the community! I hope you’re having a great week so far. 

I believe you could just put the url of your form into the redirect url settings, which would then either automatically redirect them back to the form or redirect them when they click the button on the end screen. 😀


  • Explorer
  • April 9, 2024

Thank you @Liz I’ve tried that but unfortunately entering the URL of the typeform will reload it in full screen instead of its initial embed size. 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • April 11, 2024

Ahhh got it, @fab420 . This might have to be a custom solution then. @mathio might possibly have some suggestions for you!


mathio-tf
Typeform
Forum|alt.badge.img+5

You can set redirect target for your form to redirect inside the iframe by adding data-tf-redirect-target=”_self” to your embed code (see embed SDK docs).

An alternative would be to handle this inside an onSubmit callback with custom JavaScript implementation (see docs).


  • Explorer
  • April 15, 2024

Thank you @mathio,

 

I’m using Framer and I ended up embedding the URL of the form adding the parameter 

?typeform-embed-redirect-target=_self, and it’s working great!

 

However I wasn’t able to make it work by adding data-tf-redirect-target=”_self” to the following embed code:

<div data-tf-live="TYPEFORM ID"></div><script src="//embed.typeform.com/next/embed.js"></script>

I would really appreciate if you could help me to understand how to make it work also with the embed code for future reference. 

Many thanks


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • April 15, 2024

You can put the attribute into the code like this:

<div data-tf-live="TYPEFORM ID" data-tf-redirect-target="_self"></div><script src="//embed.typeform.com/next/embed.js"></script>

 


Reply